Title: Php 8.1 error
Last modified: March 20, 2025

---

# Php 8.1 error

 *  Resolved [staygre](https://wordpress.org/support/users/staygre/)
 * (@staygre)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/php-8-1-error-11/)
 * hi, i have the following in my php error log:
 * PHP Fatal error: Uncaught TypeError: array_diff(): Argument #1 ($array) must 
   be of type array, bool given in …./public_html/wp-content/plugins/woocommerce-
   checkout-field-editor-pro/admin/class-thwcfe-admin-utils.php:474 Stack trace:….
 *     ```wp-block-code
       if(isset($keys)){
                       $keys = array_diff($keys, $custom_field_keys);
                       $keys = array_merge($custom_field_keys, $keys);
                   }
       ```
   
 * Problem solved replacing with this:
 * if(isset($keys) && is_array($keys)){
   $keys = array_diff($keys, $custom_field_keys);
   $keys = array_merge($custom_field_keys, $keys);} else {$keys = $custom_field_keys;
 * }
 * Why is this happening? Is this php 8.1compatility error?

Viewing 1 replies (of 1 total)

 *  Plugin Support [Elena](https://wordpress.org/support/users/elenathemehigh/)
 * (@elenathemehigh)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/php-8-1-error-11/#post-18373835)
 * Thank you for bringing this to our attention.
 * It seems this is related to a compatibility issue with PHP 8.1.
 * We will be adding the fix for this issue in the upcoming version of our plugin.
 * If you would like to get this sorted urgently, then feel free to submit a ticket
   through our website, and our technical team will assist you as soon as possible
   by providing an updated plugin file.
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Php 8.1 error’ is closed to new replies.

 * ![](https://ps.w.org/woo-checkout-field-editor-pro/assets/icon-256x256.gif?rev
   =3479964)
 * [Checkout Field Editor (Checkout Manager) for WooCommerce](https://wordpress.org/plugins/woo-checkout-field-editor-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-checkout-field-editor-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Elena](https://wordpress.org/support/users/elenathemehigh/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/php-8-1-error-11/#post-18373835)
 * Status: resolved