Conversation
supportI’m unable to use wp-cli ( https://wp-cli.org/ ) with this wp-imageflow2 plugin. Take the below as an example on a fresh WP 5.6 install $ wp plugin install wp-imageflow2 Installing WP Flow Plus (5.2.0) Downloading installation package from https://downloads.wordpress.org/plugin/wp-imageflow2.zip... Unpacking the package... Installing the plugin... Plugin installed successfully. Success: Installed 1 of 1 plugins. $ wp plugin activate wp-imageflow2 Plugin 'wp-imageflow2' activated. Success: Activated 1 of 1 plugins. $ wp-cli plugin list PHP Fatal error: Call to a member function getAdminOptions() on null in ...wp-content/plugins/wp-imageflow2/includes/block.php on line 40 Is this a known issue and are there any workarounds or plans to resolve this please?
This is not a known issue and I am not familiar with wp-cli. The flagged line is called on the init action, and the variable should be defined and not null at that point.
There is a similar discussion here: https://wordpress.org/support/topic/php-fatal-error-in-wp-cli/ Can you try to solve it by making a similar change, editing wpimageflow2.php line 176: $wpimageflow2 = new WPFlowPlus(); Change it to: $GLOBALS[‘wpimageflow2’] = $wpimageflow2 = new WPFlowPlus(); This reply was modified 5 years, 3 months ago by Spiffy Plugins .
Great, that does indeed resolve the issue. Could this be added into the next release of the plugin please.
I will include this in the next release. It seems like a bug in wp-cli, but I can include this as a work around. Thanks for confirming. This reply was modified 5 years, 3 months ago by Spiffy Plugins .
This is not a known issue and I am not familiar with wp-cli. The flagged line is called on the init action, and the variable should be defined and not null at that point.
There is a similar discussion here: https://wordpress.org/support/topic/php-fatal-error-in-wp-cli/ Can you try to solve it by making a similar change, editing wpimageflow2.php line 176: $wpimageflow2 = new WPFlowPlus(); Change it to: $GLOBALS[‘wpimageflow2’] = $wpimageflow2 = new WPFlowPlus(); This reply was modified 5 years, 3 months ago by Spiffy Plugins .
Great, that does indeed resolve the issue. Could this be added into the next release of the plugin please.
I will include this in the next release. It seems like a bug in wp-cli, but I can include this as a work around. Thanks for confirming. This reply was modified 5 years, 3 months ago by Spiffy Plugins .