Title: PHP Error when using JSON API
Last modified: April 16, 2021

---

# PHP Error when using JSON API

 *  Resolved [s3mstark](https://wordpress.org/support/users/s3mstark/)
 * (@s3mstark)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-error-when-using-json-api/)
 * Hello,
 * I get the following PHP error when trying to access any API Endpoint.
 * [16-Apr-2021 20:00:50 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed
   to Icon_Picker_Type_Svg::_add_mime_type() must be of the type array, null given,
   called in /html/wordpress/wp-includes/class-wp-hook.php on line 289 and defined
   in /html/wordpress/wp-content/plugins/menu-icons/vendor/codeinwp/icon-picker/
   includes/types/svg.php:69
 * I am using this plugin for some years on different sites now, always in combination
   with the JSON API, but didn’t get this error yet.
    I managed to eliminate the
   error for now by removing the variable type definiton of array in the mentioned
   method, but of course thats no good solution in future.
 * Btw I am not using the svg option. I have only activated the Image option.
 * Thanks for any hint how to manage this.

Viewing 1 replies (of 1 total)

 *  [AC](https://wordpress.org/support/users/purplecodes/)
 * (@purplecodes)
 * Themeisle Support
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-error-when-using-json-api/#post-14353117)
 * Hi [@s3mstark](https://wordpress.org/support/users/s3mstark/),
 * Can you send us a screencast showing us on how we can replicate this issue?

Viewing 1 replies (of 1 total)

The topic ‘PHP Error when using JSON API’ is closed to new replies.

 * ![](https://ps.w.org/menu-icons/assets/icon-128x128.png?rev=2526860)
 * [Menu Icons by Themeisle – Add Icons to Navigation Menus](https://wordpress.org/plugins/menu-icons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/menu-icons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/menu-icons/)
 * [Active Topics](https://wordpress.org/support/plugin/menu-icons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/menu-icons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/menu-icons/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [AC](https://wordpress.org/support/users/purplecodes/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/php-error-when-using-json-api/#post-14353117)
 * Status: resolved