freetag 3.70.4: Prevent illegal offset error
See https://board.s9y.org/viewtopic.php?f=10&t=25398
This commit is contained in:
parent
10cb326881
commit
c778b6f0cf
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue