Summary:
Summary template Fatal error LISEFielddefBase::offsetExists() after upgrade
Detailed Description:
PHP Fatal error: Uncaught TypeError: LISEFielddefBase::offsetExists(): Return
value must be of type bool, none returned in
/var/www/html/armstrong-bell-dev/modules/LISE/lib/class.LISEFielddefBase.php:160
Upgraded a site from LISE 1.4.3 to 1.5.4 and get the above error.
It's from a summary template testing to see if a field is empty (worked in 1.4.3
not in 1.5.4):
{if !empty($item->fielddefs.company.value)} FATAL ERROR {/if}
However, just outputting the field works OK:
{$item->fielddefs.company.value} <<< this works fine
And getting smarty to process it first also works:
{if !empty({$item->fielddefs.company.value})} THIS WORKS FINE {/if}
I tried to find the cause but I simply got lost trying to work out what LISE
should do. :/ But it looked like a call to parent::offsetExists, actually
referenced back to the LISEFielddefBase::offsetExists() that doesn't do
anything.
PHP8.0