On 404 pages, where there is no global $post object, PHP throws Notices of type “Trying to get property of non-object”. This is due to the use of
get_the_id()on line 53 of
This isn’t a major issue, since errors should be suppressed in production environments, but an existence check should still be made, rather than an assumption.
- The topic ‘PHP Notices on 404 Pages’ is closed to new replies.