From 7fe633e2a782fb58805ec41e03c17ce17b3b42c0 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sat, 23 Jan 2021 21:30:09 +1300 Subject: [PATCH] Fix Undefined index: sidebar- --- template-parts/wpdtrt-anchorlinks/content-anchorlinks.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/template-parts/wpdtrt-anchorlinks/content-anchorlinks.php b/template-parts/wpdtrt-anchorlinks/content-anchorlinks.php index 1f5910c..f3938c5 100644 --- a/template-parts/wpdtrt-anchorlinks/content-anchorlinks.php +++ b/template-parts/wpdtrt-anchorlinks/content-anchorlinks.php @@ -34,6 +34,10 @@ // @link http://kb.network.dan/php/wordpress/extract/. extract( $options, EXTR_IF_EXISTS ); +if ( isset( $additional_from_sidebar_id_1 ) && ( '' === $additional_from_sidebar_id_1 ) ) { + $additional_from_sidebar_id_1 = null; +} + global $post; if ( isset( $post ) && is_object( $post ) ) {