Title: PHP fatal error on wp-cli
Last modified: February 1, 2021

---

# PHP fatal error on wp-cli

 *  [infotexsupport](https://wordpress.org/support/users/infotexsupport/)
 * (@infotexsupport)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/)
 * I’m unable to use wp-cli ([https://wp-cli.org/](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?

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

 *  Plugin Author [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * (@spiffyplugins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/#post-13987753)
 * 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.
 *  Plugin Author [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * (@spiffyplugins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/#post-13987773)
 * There is a similar discussion here: [https://wordpress.org/support/topic/php-fatal-error-in-wp-cli/](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](https://wordpress.org/support/users/spiffyplugins/).
 *  Thread Starter [infotexsupport](https://wordpress.org/support/users/infotexsupport/)
 * (@infotexsupport)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/#post-13992249)
 * Great, that does indeed resolve the issue.
 * Could this be added into the next release of the plugin please.
 *  Plugin Author [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * (@spiffyplugins)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/#post-13992360)
 * 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](https://wordpress.org/support/users/spiffyplugins/).

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

The topic ‘PHP fatal error on wp-cli’ is closed to new replies.

 * ![](https://ps.w.org/wp-imageflow2/assets/icon-256x256.png?rev=1573558)
 * [WP Flow Plus](https://wordpress.org/plugins/wp-imageflow2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-imageflow2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-imageflow2/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-imageflow2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-imageflow2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-imageflow2/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 4 replies
 * 2 participants
 * Last reply from: [Spiffy Plugins](https://wordpress.org/support/users/spiffyplugins/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/php-fatal-error-on-wp-cli/#post-13992360)
 * Status: not resolved