skip to Main Content

Hi I have an issiue with this error "Undefined array key 0 in wp-includes/plugin.php on line 1004" I have no clue how to fix it or what it is casued by. Does anyone have any idea what it can be caused by or ho to fix it because i didn’t find any information about this error any help would be appreciated.

I have no clue how to fix it or what it is casued by.

2

Answers


  1. you can check though conditional statements that if the key exists before attempting to access it

    if (isset($array[0])) {     }
    
    else {
        }
    

    in plugin.php on line 1004

    Login or Signup to reply.
  2. I see that a lot when the variable being logic checked is not an array. You might add logic to check is_array().

    if (is_array( $callback )) {
        if ( is_object( $callback[0] ) ) {
            // Object class calling.
            return spl_object_hash( $callback[0] ) . $callback[1];
        } elseif ( is_string( $callback[0] ) ) {
            // Static calling.
            return $callback[0] . '::' . $callback[1];
        }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search