Undefined offset: 0
-
When DEBUG is turned on i get error Undefined offset: 0 at line 655 of file user-switching.php
if ( ( 'switch_to_user' === $cap ) and ( $args[0] == $user_id ) ) { $required_caps[] = 'do_not_allow'; }
If you add a test for empty at line 655 the error goes away
if ( ( 'switch_to_user' === $cap ) and ( !empty( $args ) && $args[0] == $user_id ) ) { $required_caps[] = 'do_not_allow'; }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Undefined offset: 0’ is closed to new replies.