Fatal error on comment post
-
After updating to php8.2 (WordPress 6.4.3, Comment Mention 1.7.6), we were getting a fatal error on line 150 of common-functions.php where the array_key_exists() call was expecting an array in the second argument.
I assumed that @cmt_mntn_settings was empty, and the OR command was failing as a result.
As a workaround, I modified this to split out the OR, which seems to have fixed it but it’s a bit of a hack:
$cmt_mntn_settings = get_option( 'cmt_mntn_settings' ); if ( ! empty( $cmt_mntn_settings)) { if ( ! array_key_exists( 'cmt_mntn_enabled_user_roles', $cmt_mntn_settings ) ) { return true; } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Fatal error on comment post’ is closed to new replies.