Conversation
supportI think since the last update my site rise an HTTP error when I try to upload a new media file. After a long digging in the Apache error log I found this. Anyone has this error too? PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function wamt_add_allow_upload_extension_exception(), 4 passed in ./wp-includes/class-wp-hook.php on line 286 and exactly 5 expected in ./wp-content/plugins/wp-add-mime-types/wp-add-mime-types.php:86\n Stack trace:\n #0 ./wp-includes/class-wp-hook.php(286): wamt_add_allow_upload_extension_exception(Array, '/tmp/phpkpO030', '467086-740x740-...', false)\n #1 ./wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array)\n #2 ./wp-includes/functions.php(2370): apply_filters('wp_check_filety...', Array, '/tmp/phpkpO030', '467086-740x740-...', false)\n #3 ./wp-admin/includes/file.php(797): wp_check_filetype_and_ext('/tmp/phpkpO030', '467086-740x740-...', false)\n #4 ./wp-admin/includes/file.php(923): _wp_handle_upload(Array, Array, '2020- in ./wp-content/plugins/wp-add-mime-types/wp-add-mime-types.php on line 86, referer: ./wp-admin/media-new.php This topic was modified 5 years, 11 months ago by kcho .
Thank you for using my plugin. I could not be recreated the above error in my environment. So, please let you know your environment. 1. WordPress version 2. PHP version 3. The uploaded file type (jpg? png?)
Hi, sorry for the missing information. It is an old WP installation: WP: 4.9.8 PHP: 7.2.31 Plugin: 2.5.4 Filetype: jpg and png Thank you. This reply was modified 5 years, 11 months ago by kcho .
O.K. I understood this issue and fixed it. Please update the plugin to version 2.5.5. The reason is that the count of arguments of the mime check function has been changed since WordPress 5.1.
Thank you for using my plugin. I could not be recreated the above error in my environment. So, please let you know your environment. 1. WordPress version 2. PHP version 3. The uploaded file type (jpg? png?)
Hi, sorry for the missing information. It is an old WP installation: WP: 4.9.8 PHP: 7.2.31 Plugin: 2.5.4 Filetype: jpg and png Thank you. This reply was modified 5 years, 11 months ago by kcho .
O.K. I understood this issue and fixed it. Please update the plugin to version 2.5.5. The reason is that the count of arguments of the mime check function has been changed since WordPress 5.1.