Undefined variable $user class-local-avatars.php:167
-
Hello mates,
With Local Avatars feature enabled, Using Query Monitor and visiting /wp-admin/, I notice a warning:
Undefined variable $user
Location: wp-content/plugins/wpmastertoolkit/admin/modules/core/class-local-avatars.php:167Error also shows in server logs:
AH01071: Got error 'PHP message: PHP Warning: Undefined variable $user in /var/www/vhosts/HIDDEN.fr/httpdocs/wp-content/plugins/wpmastertoolkit/admin/modules/core/class-local-avatars.php on line 167; PHP message: PHP Warning: Undefined variable $user in /var/www/vhosts/HIDDEN.fr/httpdocs/wp-content/plugins/wpmastertoolkit/admin/modules/core/class-local-avatars.php on line 167; PHP message: PHP Warning: Undefined variable $user in /var/www/vhosts/HIDDEN.fr/httpdocs/wp-content/plugins/wpmastertoolkit/admin/modules/core/class-local-avatars.php on line 167; PHP message: PHP Warning: Undefined variable $user in /var/www/vhosts/HIDDEN.fr/httpdocs/wp-content/plugins/wpmastertoolkit/admin/modules/core/class-local-avatars.php on line 167', referer: https://www.HIDDEN.fr/Lines 167-169:
167 if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) {
168 $user = get_user_by( 'email', $id_or_email->comment_author_email );
169 }It seems like
$useris referenced before it’s defined. Should be an easy fix for you, talented mates!All the best
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Undefined variable $user class-local-avatars.php:167’ is closed to new replies.