Title: PHP fatal error in plugin
Last modified: September 20, 2023

---

# PHP fatal error in plugin

 *  Resolved [sasa2282](https://wordpress.org/support/users/sasa2282/)
 * (@sasa2282)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-in-plugin/)
 * 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 [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/)
 * (@sebastienserre)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-in-plugin/#post-17067604)
 * Hello,
 * Thank you [@sasa2282](https://wordpress.org/support/users/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) + Polylangstep
   3: check that you don’t get your issue anymorestep 4: if step 3 works then activate
   your theme then redo step 3step 5: if step 4 works then activate your child theme
   if any then redo step 3step 6: if step 5 works, then activate your plugins one
   by one until you reproduce your issueLet us know at which moment you got this
   fatal error.
 * Regards
    -  This reply was modified 2 years, 8 months ago by [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/).
      Reason: typo corrections
 *  Thread Starter [sasa2282](https://wordpress.org/support/users/sasa2282/)
 * (@sasa2282)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-in-plugin/#post-17071255)
 * 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.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [sasa2282](https://wordpress.org/support/users/sasa2282/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-in-plugin/#post-17071255)
 * Status: resolved