• I use Version 2.2.3 on a new server with PHP8.

    After export my website from PHP 7.2. I have a error in cookie-notice/cookie-notice.php:742.

    I have update
    if ( array_key_exists( $param, $options ) && ! is_bool( $options[$param] ) )

    to

    if ( is_array($param) && array_key_exists( $param, $options ) && ! is_bool( $options[$param] ) )

    • This topic was modified 4 years, 1 month ago by Dave.
Viewing 1 replies (of 1 total)
  • Plugin Author dFactory

    (@dfactory)

    Thanks, but thing is the array should be $options here and it should never be empty. Might be some edge case scenario.

    Anyway, that would be a valid syntex instead:

    if ( is_array( $options ) && array_key_exists( $param, $options ) && ! is_bool( $options[$param] ) )

Viewing 1 replies (of 1 total)

The topic ‘PHP 8 Uncaught TypeError: array_key_exists()’ is closed to new replies.