From f25da6c3a7637a13370d7b6697a459d8d47ff00f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 12 Sep 2023 19:32:27 -0700 Subject: [PATCH] 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 https://github.com/jquery/infrastructure-puppet/issues/31. --- themes/learn.jquery.com/sidebar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/learn.jquery.com/sidebar.php b/themes/learn.jquery.com/sidebar.php index 8d8cf6a0..d1100d02 100644 --- a/themes/learn.jquery.com/sidebar.php +++ b/themes/learn.jquery.com/sidebar.php @@ -12,7 +12,7 @@