freetag: Fix php 7 issue by avoiding counting a non-array (#80)
This commit is contained in:
parent
a0c3c4bbff
commit
524b26d0d5
|
@ -1,3 +1,5 @@
|
|||
3.70: Fix php 7 compatibility issue by avoiding counting a non-array
|
||||
|
||||
3.69: Fix possible SQL injection for tagnames, Thanks to Brian carpenter (geeknik) and Hanno BÃck
|
||||
|
||||
3.67: Iconfont a11y fix (yellowled)
|
||||
|
|
|
@ -72,7 +72,7 @@ class serendipity_event_freetag extends serendipity_event
|
|||
'smarty' => '2.6.7',
|
||||
'php' => '4.1.0'
|
||||
));
|
||||
$propbag->add('version', '3.69');
|
||||
$propbag->add('version', '3.70');
|
||||
$propbag->add('event_hooks', array(
|
||||
'frontend_fetchentries' => true,
|
||||
'frontend_fetchentry' => true,
|
||||
|
@ -1346,7 +1346,11 @@ addLoadEvent(enableAutocomplete);
|
|||
|
||||
$show_related = serendipity_db_bool($this->get_config('show_related', true));
|
||||
|
||||
$elements = count($eventData);
|
||||
if (is_array($eventData)) {
|
||||
$elements = count($eventData);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
// If not using extended-smarty, we want related entries only when
|
||||
// showing only one entry. It is better to ask Smarty here than doing
|
||||
|
|
Loading…
Reference in a new issue