trim() error in advanced dropdown

Status
Not open for further replies.

lori19

Active Member
Hi there!

I get the following error whit system debug on that seems to break my list view navigation:

An error has occurred with a eval'd field - please inform the web-site owner. Debug: Eval exception : project::getPhpOptions() : $proptione = ""; $db =\Joomla\CMS\Factory::getContainer()->get('DatabaseDriver'); $db->setQuery('SELECT DISTINCT project_name FROM projects ORDER BY project_name'); $rows = $db->loadObjectList(); if ($rows) { foreach ($rows as $row) { $proptions[] = JHTML::_('select.option', $row->project_name, $row->abbreviation); } return $proptions; } return $proptions; : trim(): Passing null to parameter #1 ($string) of type string is deprecated

The trim that is mentioned as the culpit seems to be in the element plugin, right?

Thanks!
Lorenz

J 4.3.2, PHP 8.2.7, F4Delte updated from 3.x
 
1. You only get this deprecated error if Fabrik debug is on.

Make sure to set no NULL values, you can do something like
JHTML::_('select.option', $row->project_name ?? '', $row->abbreviation ?? ''); //ie. setting to '' if null
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top