• Resolved sasa2282

    (@sasa2282)


    Hi,

    I updated the PHP version from 7.4 to 8.1.2 and I am facing with the fatal error, thrown by Polylang:

    [Wed Sep 20 08:29:21.528588 2023] [php:error] [pid 9876] [client 164.8.251.71:64104] PHP Fatal error: Uncaught TypeError: array_diff(): Argument #1 ($array) must be of type array, null given in /var/www/html/wp-content/plugins/polylang/modules/wpml/wpml-config.php:191

    I am using WP 6.3.1, polylang 3.4.5 and have tried rollback to version 3.3 and reinstallatin of the plugin, but the issue persists.

    Could you advise how to fix this?

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Sébastien SERRE

    (@sebastienserre)

    Hello,

    Thank you @sasa2282 to report us this issue you’re encountering.

    I unfortunately do not reproduce it with PHP 8.1.18 (I can’t specify specifically 8.1.2 like you).
    Do you perform some actions to get this fatal or it just appears without doing anything ?

    Because I do not reproduce with only Polylang 3.4.5, WordPress 6.3.1 and Twenty Twenty One 1.8, I would recommend you to search for a conflict with a 3rd party:
    step 1: deactivate all your plugins as well as your mu-plugins,
    step 2: activate Twenty Twenty One (default WordPress theme) + Polylang
    step 3: check that you don’t get your issue anymore
    step 4: if step 3 works then activate your theme then redo step 3
    step 5: if step 4 works then activate your child theme if any then redo step 3
    step 6: if step 5 works, then activate your plugins one by one until you reproduce your issue

    Let us know at which moment you got this fatal error.

    Regards

    • This reply was modified 1 year, 5 months ago by Sébastien SERRE. Reason: typo corrections
    Thread Starter sasa2282

    (@sasa2282)

    Hi, Sebastian.

    Thank you for your reply. I went with this approach and found that one of my functions in functions.php caused the error and the polylang fatal error was just a simptom, not the root cause.

    Thank you again for your help, you can close this ticket, as I solved the issue successfuly (again, not the fault with Polylang).

    Regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP fatal error in plugin’ is closed to new replies.