PHP warning on empty category page
-
Hi,
The GitHub repository is no longer used?
In “get_the_image.php”, line 132:
'post_id' => get_the_ID(),
If there is no current post, for example in an empty category page, this line displays a warning: “Notice: Trying to get property of non-object in /…/wp-includes/post-template.php on line 30”.
Please replace with:
'post_id' => isset($args['post_id']) ? null : get_the_ID(),
- The topic ‘PHP warning on empty category page’ is closed to new replies.