Notice: Trying to get property ‘slug’ of non-object in /public_html/wp
-
I am getting the notice above quite frequently in my error log (it is not being displayed on the site). I can’t really replicate it as to understand what visitor behavior is triggering it, but looking at the code in that line as a beginner developer, I am not sure it is right:
if ( $current_lang = $links->curlang->slug == $slug ) {
I believe it is worth checking.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Notice: Trying to get property ‘slug’ of non-object in /public_html/wp’ is closed to new replies.