• Hi there,

    with the latest update, I now get the following error message by trying to update plugins/themes/translations via WP-CLI:

    PHP Warning:  Trying to access array offset on value of type null in /home/wp-content/plugins/svg-support/functions/mime-types.php on line 22
    Warning: Trying to access array offset on value of type null in /home/wp-content/plugins/svg-support/functions/mime-types.php on line 22
    PHP Fatal error:  Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in /home/wp-content/plugins/svg-support/functions/mime-types.php:28
    Stack trace:
    #0 /home/wp-content/plugins/svg-support/functions/mime-types.php(28): array_intersect()
    #1 /home/wp-includes/class-wp-hook.php(310): bodhi_svgs_upload_mimes()
    #2 /home/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #3 /home/wp-includes/functions.php(3546): apply_filters()
    #4 /home/wp-includes/block-editor.php(211): get_allowed_mime_types()
    #5 /home/wp-includes/class-wp-theme-json-resolver.php(288): get_default_block_editor_settings()
    #6 /home/wp-includes/class-wp-theme-json-resolver.php(540): WP_Theme_JSON_Resolver::get_theme_data()
    #7 /home/wp-includes/script-loader.php(3205): WP_Theme_JSON_Resolver::get_merged_data()
    #8 /home/wp-includes/script-loader.php(3401): {closure}()
    #9 /home/wp-includes/class-wp-hook.php(308): {closure}()
    #10 /home/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #11 /home/wp-includes/plugin.php(517): WP_Hook->do_action()
    #12 /home/wp-settings.php(639): do_action()
    #13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('...')
    #14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
    #15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
    #17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #18 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('...')
    #19 /usr/local/bin/wp(4): include('...')
    #20 {main}
      thrown in /home/wp-content/plugins/svg-support/functions/mime-types.php on line 28
    Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in /home/wp-content/plugins/svg-support/functions/mime-types.php:28
    Stack trace:
    #0 /home/wp-content/plugins/svg-support/functions/mime-types.php(28): array_intersect()
    #1 /home/wp-includes/class-wp-hook.php(310): bodhi_svgs_upload_mimes()
    #2 /home/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #3 /home/wp-includes/functions.php(3546): apply_filters()
    #4 /home/wp-includes/block-editor.php(211): get_allowed_mime_types()
    #5 /home/wp-includes/class-wp-theme-json-resolver.php(288): get_default_block_editor_settings()
    #6 /home/wp-includes/class-wp-theme-json-resolver.php(540): WP_Theme_JSON_Resolver::get_theme_data()
    #7 /home/wp-includes/script-loader.php(3205): WP_Theme_JSON_Resolver::get_merged_data()
    #8 /home/wp-includes/script-loader.php(3401): {closure}()
    #9 /home/wp-includes/class-wp-hook.php(308): {closure}()
    #10 /home/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #11 /home/wp-includes/plugin.php(517): WP_Hook->do_action()
    #12 /home/wp-settings.php(639): do_action()
    #13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('...')
    #14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
    #15 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #16 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
    #17 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #18 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('...')
    #19 /usr/local/bin/wp(4): include('...')
    #20 {main}
      thrown in /home/wp-content/plugins/svg-support/functions/mime-types.php on line 28

    The command I was using here: wp plugin update --all

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here. I end up with this, when i try to use Capistrano to deploy local updates to staging:

    DEBUG [9b955ebd] 	Warning: Trying to access array offset on value of type null in /home/svev/web/svev.websitetotal.com/app/releases/20221115093308/wp-content/plugins/svg-support/functions/mime-types.php on line 22
     DEBUG [9b955ebd] 	Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in /home/svev/web/svev.websitetotal.com/app/releases/20221115093308/wp-content/plugins/svg-support/functions/mime-types.php:28

    Same

    Same here. I can confirm this bug introduced with latest update of this plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type arra’ is closed to new replies.