Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
learn.jquery.com: Fix PHP warning when empty search results
Previously, the sidebar logic was trying to mark pages as active based on the last result, because that's what the $post variable will be set to from the main loop (have_posts/the_post) in e.g. the search.php or other theme file. Weird as that might be, where it goes wrong is when there is no $post variable, e.g. on a 404, empty category, or empty search results page. Fixes jquery/infrastructure-puppet#31.
- Loading branch information