Title: WP-CLI fatal error when global controller is null
Last modified: September 28, 2026

---

# WP-CLI fatal error when global controller is null

 *  [lifelightweb](https://wordpress.org/support/users/lifelightweb/)
 * (@lifelightweb)
 * [6 days, 6 hours ago](https://wordpress.org/support/topic/wp-cli-fatal-error-when-global-controller-is-null/)
 * **Good Reviews for WordPress: WP-CLI fatal error when global controller is null**
 * On a site running PHP 8.4 and Good Reviews for WordPress 2.3.14, `wp plugin list`
   fails while loading the plugin:
 *     ```wp-block-code
       Call to a member function check_permission() on null
       includes/Settings.class.php:416
       ```
   
 * `show_submit_button()` declares `global $grfwp_controller` and calls `$grfwp_controller-
   >permissions->check_permission()`. The controller is assigned at file scope near
   the end of `good-reviews-wp.php`. During WP-CLI loading, that assignment appears
   not to populate the global variable read by `show_submit_button()`. Running the
   same command with `--skip-plugins=good-reviews-wp` succeeds, which isolates the
   failure to this plugin.
 * Please test explicitly declaring the global before the assignment:
 *     ```wp-block-code
       // Global instance
       global $grfwp_controller;
       $grfwp_controller = grfwpInit::instance();
       ```
   
 * The plugin may also benefit from checking that the controller and permissions
   object exist before calling `check_permission()`. Re-uploading version 2.3.14
   did not resolve the error.

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp-cli-fatal-error-when-global-controller-is-null%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/good-reviews-wp/assets/icon-128x128.png?rev=2205475)
 * [Five Star Restaurant Reviews](https://wordpress.org/plugins/good-reviews-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/good-reviews-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/good-reviews-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/good-reviews-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/good-reviews-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/good-reviews-wp/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [lifelightweb](https://wordpress.org/support/users/lifelightweb/)
 * Last activity: [6 days, 6 hours ago](https://wordpress.org/support/topic/wp-cli-fatal-error-when-global-controller-is-null/)
 * Status: not resolved