Query monitors alerts about 2 PHP errors
-
NoticeUndefined variable: user+
- wp-content/themes/sacconicase/functions.php:699
1TemaNoticeTrying to get property ‘ID’ of non-object+
- wp-content/themes/sacconicase/functions.php:699
1Tema
NoticeUndefined variable: user+
- wp-content/themes/sacconicase/functions.php:703
1TemaNoticeTrying to get property ‘ID’ of non-object+
- wp-content/themes/sacconicase/functions.php:703
Line 699 is:
$german = get_the_author_meta('periodo_affitti_de', $user->ID );inside
add_shortcode('periodo_affitti', 'translate_rent'); function translate_rent() { global $post; $german = get_the_author_meta('periodo_affitti_de', $user->ID ); if ( 'de_DE' == get_locale() && ! empty( $german )){ return $german; } else { return get_the_author_meta( 'periodo_affitti', $user->ID ) ; } }Line 703 is inside the same function
When I have “return” I dont know how to fix the function
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Query monitors alerts about 2 PHP errors’ is closed to new replies.