• Resolved comw

    (@comw)


    Running any WP CLI command on a website with this plug-in installed produces an error (on PHP 8.0).

    Example command: wp option get siteurl

    Error: PHP Fatal error: Uncaught Error: Call to a member function getCssFile() on null in wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php:44

    The error is in line 44. You will need to check if the $path variable is set as it may not be in the WP CLI context.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Adam from Trustindex

    (@adam140299)

    Hello @comw!

    We have solved the problem, you can check it by upgrading your plugin to the newest version of it.

    Thank you for your patience!

    Feel free to write to us, if you need further assistance,
    Adam
    Trustindex

    Thread Starter comw

    (@comw)

    Hi,

    There has been no new plug-in version released since my report, the issue still exists in the latest public version 7.11.

    Plugin Support Adam from Trustindex

    (@adam140299)

    Hi @comw,

    Could you please send us example WP CLI commands that you wanted to run? Also it would be good, if you could send us the info box from plugin’s Troubleshooting tab, which is located in top navbar’s right side on plugin’s settings page.

    Thanks in advance!

    Feel free to write to us, if you need further assistance,
    Adam
    Trustindex

    Hi Hungary,

    I also have the same problem with a PHP 7.4 version on a multisite WordPress.
    Just simply launching the wp with no parameters brings the error too.
    So I downgraded the version to the previous one, and the issue disappeared.

    Here is the trace :

    $> wp
    Fatal error: Uncaught Error: Call to a member function getCssFile() on null in /***/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php:44
    Stack trace:
    #0 /***/wp-includes/class-wp-hook.php(303): WP_CLI\Runner->{closure}()
    #1 /***/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #2 /***/wp-includes/plugin.php(470): WP_Hook->do_action()
    #3 /***/wp-settings.php(578): do_action()
    #4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require(‘/***…’)
    #5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
    #6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
    #7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process()
    #8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap in /***/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php on line 44`

    Thanks in advance ??
    Best regards
    Arnaud BeLO.

    Hi there,
    Im also having WP CLI errors, PHP 8:

    wp rocket clean
    PHP Fatal error: Uncaught Error: Call to a member function getCssFile() on null in /…/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php:44
    Stack trace:
    #0 /…/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}(”)
    #1 /…/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #2 /…/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #3 /…/wp-settings.php(587): do_action(‘init’)
    #4 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require(‘/srv/users/thew…’)
    #5 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
    #6 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
    #7 phar:///opt/sp/bin/wp-cli.phar/vendor/ in /…/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php on line 44
    Fatal error: Uncaught Error: Call to a member function getCssFile() on null in /…/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php:44
    Stack trace:
    #0 /…/wp-includes/class-wp-hook.php(307): WP_CLI\Runner->{closure}(”)
    #1 /…/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #2 /…/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #3 /…/wp-settings.php(587): do_action(‘init’)
    #4 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1271): require(‘/srv/users/thew…’)
    #5 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1192): WP_CLI\Runner->load_wordpress()
    #6 phar:///opt/sp/bin/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
    #7 phar:///opt/sp/bin/wp-cli.phar/vendor/ in /…/wp-content/plugins/wp-reviews-plugin-for-google/wp-reviews-plugin-for-google.php on line 44
    Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

    Thread Starter comw

    (@comw)

    This issue is fixed on version 7.12 of this plug-in that was released today.

    Great, I’m gonna test this quickly ??
    Thanks a lot for your reactivity !

    Plugin Support Adam from Trustindex

    (@adam140299)

    Hi everyone,

    Yes, you can test it from 7.12 version.

    Thank you for your interests!

    Feel free to write to us, if you need further assistance,
    Adam
    Trustindex

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WP CLI Error’ is closed to new replies.