• Is Worker plugin compatible with PHP 8 ?

    I check with PHP 8.0 on Infomaniak server, but I have a Fatal error.

    Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-content/plugins/worker/src/MMB/Core.php:76 Stack trace: #0 /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-includes/class-wp-hook.php(308): MMB_Core->admin_notice(”) #1 /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #2 /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-admin/admin-header.php(303): do_action(‘admin_notices’) #4 /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-admin/plugins.php(605): require_once(‘/home/clients/d…’) #5 {main} thrown in /home/clients/da7b077b0f5297e29528bae8195e232e/sites/chaussin.votre-webmaster-freelance.fr/wp-content/plugins/worker/src/MMB/Core.php on line 76

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Stefan

    (@sradovanovic)

    Hey Mickael,

    The Worker plugin is fully compatible with PHP 8. However, sometimes the Worker-related data gets signed with the wrong type in the database. Essentially, the count() function expects to receive a different type and PHP 8 typeChecking system is quite strict about that, unlike PHP 7.4.

    To get rid of the error, could you please remove the Worker plugin from your website completely and remove all entries that start with “mwp_” from your wp-options table?

    Here’s how you can search for any Worker-related entries:

    e082d0a6fae78c2dc02be38c78e13955.png

    Once you’ve removed all entries, please clear your website’s cache and re-install the Worker plugin once more.

    Hi Stefan,

    there is some depricated function with PHP 8.2. Can you fix it please?

    Thanks

    Plugin Support Miljana Matic

    (@mmatic1)

    Hi Jakub,

    You can try following the steps my colleague Stefan previously suggested – deleting the database entries should do the trick when it comes to deprecated function errors as well.

    However, if it doesn’t, can you please send us the full error you’re getting? You can also open a ticket with our support team and we’ll look into it further.

    Hi Miljana,

    there are still some deprecateds after cleaning db:

    strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated 1
    wp-includes/functions.php:7022 – from:

    MWP_WordPress_Context->addSubMenuPage()
    /worker/src/MWP/EventListener/PublicRequest/AddStatusPage.php:44


    str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated 1
    wp-includes/functions.php:2162 – from:

    wp-content/plugins/worker/src/MWP/WordPress/Context.php:770
    MWP_WordPress_Context->addSubMenuPage()

    base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated 1
    wp-content/plugins/worker/src/MWP/Worker/Request.php:198

    First and second are maybe from WP core, third looks that it is form plugin

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

The topic ‘PHP 8 compatibility’ is closed to new replies.