• Resolved jayPEG

    (@jaypeg)


    Hi, I was looking through site PHP Error Log and am seeing a lot of error messages like this…

    Error Message: PHP Warning: WPMUDEV_BLC\Core\Controllers\Webhook::parse_request(): Argument #1 ($wp) must be passed by reference, value given in /home/customer/www/mydomain.com/public_html/wp-includes/class-wp-hook.php on line 324

    From what I read, this warning occurs when the parse_request method of the WPMUDEV Broken Link Checker (BLC) plugin expects its first argument ($wp) to be passed by reference (i.e., &$wp), but it’s being passed by value. This is likely due to a compatibility issue between the plugin and the WordPress version, or a coding error in how the plugin hooks into WordPress’s WP_Hook system. This may disrupt the webhook functionality of the Broken Link Checker plugin, potentially causing it to fail in processing incoming webhook requests, which could affect link monitoring or updates.

    WordPress is currently at 6.8.2 and Broken Link Checker is at version 2.4.6. Is this something you’ve seen?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hello @jaypeg

    Hope you’re doing well today! Thank you for reaching out to us.

    I checked about this; however, I could not find any similar reports about the PHP Warning. I tried to replicate the issue on my lab environment with just BLC v2.4.6 with the Default WordPress theme and WP v6.8.2.

    However, I was not able to replicate the warning you’re noticing. To address why it could be happening, can you please let us know the PHP version that you are using on your site? This way, we can try to further replicate the issue and get further insights from the BLC team.

    Kind Regards,
    Saurabh

    Thread Starter jayPEG

    (@jaypeg)

    Thank you Saurabh. The site is using PHP 8.2.29.

    Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hello @jaypeg,

    I hope things are going well for you.

    Thank you for sharing the PHP version with us. I tested it using PHP 8.2.29 + BLC 2.4.6 + WP 6.8.2 on an NGNIX web server.

    I still cannot see the same logs in the debug logs. It seems more likely that the site or server is specific to capturing the logs.

    Could you please create a test site? If your hosting offers a staging site, try conducting a full conflict test there. You can follow this guide: https://wpmudev.com/docs/getting-started/getting-support/#conflict-test

    Alternatively, you can create a fresh WP site using either this website: https://instawp.com/ or the LocalWP Application.

    Set up a server as you prefer for testing, and see if you can reproduce the same error with the fresh WordPress installation and share the outcome with us.


    Kind Regards,
    Imran Khan

    Thread Starter jayPEG

    (@jaypeg)

    Thank you Imran,

    I ran the error logs through AI and was told this.

    “The parse_request() method in your plugin is declaring the $wp parameter by reference (&$wp), but WordPress core fires do_action('parse_request', $wp) by value. This causes a PHP warning in PHP 8+ and needs to be corrected in the plugin code. This is not a theme or plugin conflict but a compatibility issue with the plugin’s function signature.”

    I’m not sure if that’s helpful, but I though I’d try that before spinning up a staging site.

    Best,
    -Thomas



    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jaypeg

    Thank you for the information.

    I believe that is correct, I checked WordPress doc https://developer.ww.wp.xz.cn/reference/hooks/parse_request/ > Parameters “Current WordPress environment instance (passed by reference).” but all the samples and usage that I could find will receive it as a regular value $wp.

    I will bring it attention to our developers so we can double check that parse request function.

    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @jaypeg

    Just an update

    I was checking it further, the parameters is actually supposed to be passed by reference, it seems to be safe using $wp instead &$wp however, the &$wp signature is because WordPress itself is supposed to pass it as reference as previously mentioned:

    https://developer.ww.wp.xz.cn/reference/hooks/parse_request/ > Parameters “Current WordPress environment instance (passed by reference).” but all the samples and usage that I could find will receive it as a regular value $wp.

    Ideally it wouldn’t cause any warning as Broken Link Checker is expecting to receive just as what we have in WordPress doc.

    What could be happening here is something else messing with that hook parameter, I pinged our developers but since it sounds like a potential conflict in the meantime running the plugin conflict test could help us to figure out why it is happening on your website https://ww.wp.xz.cn/support/topic/wpmudev_blc-webhook-warning/#post-18579614

    Best Regards
    Patrick Freitas

    Thread Starter jayPEG

    (@jaypeg)

    Okay, this is strange, but there were other errors going on specifically with Ninja Tables Pro. I went ahead and disabled this since it was less crucial to the site working and found that the errors went away for both Plugins. I then re-activated Broken Link Checker Plugin and neither of the errors have returned in the last 24 hours. There must have been some conflicting processes with those two Plugins that was hung up that deactivating the Plugin cleared out. I’ll let you know if it returns, but for now, I’ll mark this as resolved. Thank you very much.

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

The topic ‘WPMUDEV_BLC Webhook Warning’ is closed to new replies.