diff --git a/serendipity_event_freetag/ChangeLog b/serendipity_event_freetag/ChangeLog index 0859b6df..df19b8e9 100644 --- a/serendipity_event_freetag/ChangeLog +++ b/serendipity_event_freetag/ChangeLog @@ -1,3 +1,5 @@ +3.70.4: Fix a situation when an illegal offset error could occur + 3.70.3: Hotfixes for PHP 8 (surrim) 3.70.2: Fix warning in RSS feed when using PHP 8 diff --git a/serendipity_event_freetag/serendipity_event_freetag.php b/serendipity_event_freetag/serendipity_event_freetag.php index fbf55e4f..67318d2f 100644 --- a/serendipity_event_freetag/serendipity_event_freetag.php +++ b/serendipity_event_freetag/serendipity_event_freetag.php @@ -66,7 +66,7 @@ class serendipity_event_freetag extends serendipity_event 'smarty' => '2.6.7', 'php' => '7.0' )); - $propbag->add('version', '3.70.3'); + $propbag->add('version', '3.70.4'); $propbag->add('event_hooks', array( 'frontend_fetchentries' => true, 'frontend_fetchentry' => true, @@ -1548,7 +1548,11 @@ addLoadEvent(enableAutocomplete); } } } - unset($tags[$tag]); + // Check that $tag is a valid value to prevent the 'illegal offset error' that will occur + // on real traffic patterns (unclear on which page exactly) + if ($tag != null && is_string($tag) && isset($tags[$tag])) { + unset($tags[$tag]); + } return $tags; }