• Resolved Abigailm

    (@abigailm)


    Currently running PHP 8 — I’m seeing this warning in my PHP error logs:

    PHP Warning:  Attempt to read property "display_name" on bool in .../plugins/all-in-one-seo-pack/app/Common/Utils/Tags.php on line 939
    
    PHP Warning:  Attempt to read property "display_name" on bool in .../plugins/all-in-one-seo-pack/app/Common/Utils/Tags.php on line 940
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    @abigailm do you know which type of page (post, term, archive, etc.) triggered this warning?

    Thread Starter Abigailm

    (@abigailm)

    I’ve chased it down — It’s a combination of a 404 problem and an RSS feed request —

    basically a request for myblog.com/author/SOMEBODY/feed where there is no SOMEBODY

    I tested, and the problem doesn’t occur with myblog.com/author/REALUSER/feed — just from the bad entry.

    I can fix this on my end because all the requests are coming from one source — so it’s a very low priority issue. But of course, bots are always picking up bad URLs so it probably would make sense for your developers to add some sort of IF statement for the case where the request does not exist.

    The specific code lines throwing off this error are:

    case 'author_name':
    				$name = $author->display_name;
    				return empty( $name ) && $sampleData ? wp_get_current_user()->display_name : $author->display_name;

    So if an author changes their display name and/or if an author is removed from a site, then requests for the archive using the nonexistent display name would generate this error.

    I think for purposes of SEO it’s valuable to anticipate that this information will change or get stale over time.

    However, as I have identified the problem on my end, I am going to mark this issue as resolved for me.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    @abigailm each user in WordPress always has a display name; that’s why I was curious as to where you were seeing this issue. That makes a lot of sense and I’ve taken note of it. For now you can safely dismiss any SEO concerns you have since it’s a 404 page anyway.

    Thread Starter Abigailm

    (@abigailm)

    I agree that the problem is resolved for me — the problem is simply that it fills up error logs with repeated warnings.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Warning “attempt to read”’ is closed to new replies.