Small bug: PHP notice when not in loop/post
In wp-jquery-lightbox.php in function
jqlb_autoexpand_rel_wlightbox(), at line 134, you are testing for
$post->ID. However, if $post is not set (e.g. not in loop, or many other reasons) then this causes a PHP notice as it tries to access a non-existing object property.
A better test is isset(), replacing:
$id = ($post->ID) ? $post->ID : -1;
$id = isset($post->ID) ? $post->ID : -1;
- The topic ‘Small bug: PHP notice when not in loop/post’ is closed to new replies.