Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8292
    webarts
    Participant

    Hello there,

    We are experiencing a fatal error when navigating on random admin pages but most of the time it happens when we try to access the Update page of WordPress.
    The error we see is this one
    [26-Jun-2023 10:41:17 UTC] PHP Fatal error: Uncaught Error: Attempt to assign property “filename” on null in /wp-content/plugins/user-role-editor-pro/pro/includes/plugin-update-checker.php:222

    We deactivated and re-activated the plugin and are currently working with Version 4.63.4. Is this a bug or some know issue?

    Kind regards,
    Nana

    #8293
    Vladimir
    Keymaster

    Hi Nana,

    I’m sure it’s not URE Pro bug. Your notification is the 1st for the perion this part of code stays unchanged.

    Let’s trace the code from line #222, which causes the PHP fatal error:


    user-role-editor.php: #37: define( 'URE_PLUGIN_FULL_PATH', __FILE__ );
    pro/includes/classes/user-role-editor-pro.php: #54: $ure_update_checker = new PluginUpdateChecker(URE_UPDATE_URL . '?action=get_metadata&slug=user-role-editor-pro', URE_PLUGIN_FULL_PATH);
    pro/includes/plugin-update-checker.php: #52: $this->pluginAbsolutePath = $pluginFile;
    pro/includes/plugin-update-checker.php: #53: $this->pluginFile = plugin_basename($this->pluginAbsolutePath);
    pro/includes/plugin-update-checker.php: #222: $pluginInfo->filename = $this->pluginFile;

    As you can see from the code above $this->pluginFile at the line 222 can not be null, if exactly this code is executed. It just processes PHP built-in __FILE__ constant value.

    I suppose that you may use another plugin, which also use PluginUpdateChecker class, but defined earlier due to code execution queue and possibly another version, which may lead to a conflict. Check your plugins source code using command similar

    grep -rn ‘PluginUpdateChecker’

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.