Version 2.5.2 breaks WP-CLI
-
Upon running any WP-CLI command:
Warning: Trying to access array offset on value of type null in /.../plugins/svg-support/functions/mime-types.php on line 22
And:
Fatal error: Uncaught TypeError: array_intersect(): Argument #1 ($array) must be of type array, null given in /.../plugins/svg-support/functions/mime-types.php:28
Adding something like
if ( is_array( $allowed_roles_array ) )
to the offending line “fixes” the issue (albeit only until the next update, of course). Unfortunately, I didn’t have a chance to look into whether there is fallout elsewhere (I only went this hack route to avoid deactivating and reactivating the plugin every time I need to do something with WP-CLI while we wait for a real fix).Wonderful plugin, BTW!
- The topic ‘Version 2.5.2 breaks WP-CLI’ is closed to new replies.