• Resolved Derek Ashauer

    (@sccr410)


    With version 0.6.0, there is a fatal error in the admin:

    Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, null given in /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Version_Control.php:165 Stack trace: #0 /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Version_Control.php(165): array_reverse(NULL, true) #1 /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Version_Control.php(187): Tableberg\Version_Control->get_plugin_versions_info() #2 /nas/content/live/xxxxxxx/wp-includes/class-wp-hook.php(324): Tableberg\Version_Control->add_settings_menu_data(Array) #3 /nas/content/live/xxxxxxx/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #4 /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Assets.php(114): apply_filters(‘tableberg/filte…’, Array) #5 /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Admin/Tableberg_Admin.php(192): Tableberg\Assets->register_admin_assets() #6 /nas/content/live/xxxxxxx/wp-includes/class-wp-hook.php(324): Tableberg\Admin\Tableberg_Admin->enqueue_admin_script(‘toplevel_page_t…’) #7 /nas/content/live/xxxxxxx/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #8 /nas/content/live/xxxxxxx/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #9 /nas/content/live/xxxxxxx/wp-admin/admin-header.php(118): do_action(‘admin_enqueue_s…’, ‘toplevel_page_t…’) #10 /nas/content/live/xxxxxxx/wp-admin/admin.php(239): require_once(‘/nas/content/li…’) #11 {main} thrown in /nas/content/live/xxxxxxx/wp-content/plugins/tableberg/includes/Version_Control.php on line 165

    PHP 8.2.28

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Hi @sccr410

    We couldn’t recreate your issue. We’ve checked the code and it seems quite robust. We’ve had the same code running in at least 3 plugins for years and we haven’t seen this issue there either.

    Please check if you disabling other plugins fixes the issue. Please also check your wordpress settings. If possible, spin up a new wordpress installation, install tableberg, and see if you face the same issue.

    Thread Starter Derek Ashauer

    (@sccr410)

    It is not robust enough. With only the Tableberg plugin active this error still occurs.

    var_dump( $plugin_remote_info->versions ); // This is NULL

    There is no data on the versions information for this install.

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Hi, can you please share the output of this below snippet?

    var_dump($plugin_remote_info);

    The output will be quite long, try formatting it as inline code or use github gist/pastebin etc. to share it.

    Thread Starter Derek Ashauer

    (@sccr410)

    $plugin_remote_info->versions is NULL

    this causes the error

    I can try to reproduce it again later next week

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    We understand that the value of $plugin_remote_info->versions is NULL. We can clearly see that from your first post. What we’re trying to understand is how this can come to be. In the code, the plugins_api function is used to get plugin info using our plugin slug: tableberg. A published plugin shouldn’t return NULL as its versions. Since it’s been published, at least one version of it obviously exists. I hope you see my point. Therefore, for further clues to help you fix and diagnose your issue, we need to see the value of $plugin_remote_info on your machine.

    Thread Starter Derek Ashauer

    (@sccr410)

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Are you using wpengine? I ask because I see https://plugin-updates.wpengine.com/ many times in your paste. I’m guessing this is the mirror plugin repository maintained by wpengine.

    Thread Starter Derek Ashauer

    (@sccr410)

    Yes, the site is on WP Engine

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Okay, so it’s definitely a quirk of WP Engine’s plugin repository mirror. It looks like on their mirror, they do not store the version information of the plugins. I can’t really check – they don’t allow easy access to it and I’m not a WP Engine customer. I don’t understand why a company of WP Engine’s stature has to resort to these strange tactics – it’s unlikely they’re saving a huge amount of storage by omitting this. On the other hand, they’re just creating more hosting provider specific work for us downstream with this undocumented trait of their platfrom. Their size and popularity does not allow us to ignore an issue this.

    Thank you so much for sharing this with us and going through all the trouble to get the cause figured out. We’ll need to make a decision on how to address this. I hope you understand. We’ll get back to you ASAP.

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Hi @sccr410 we’ve decided to disable our version control if the plugin version info is not available. This will be available in the next update and it should fix the fatal error on your site. I hope you’ll give our plugin another shot when the next update drops. Thanks!

    Thread Starter Derek Ashauer

    (@sccr410)

    We definitely are still using it, I just manually changed the code to prevent the code error for now – great plugin πŸ™‚

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

The topic ‘Fatal error in admin’ is closed to new replies.