Fix that false values in dropdowns get ignored

plus some more fixes in the same area
This commit is contained in:
Johannes Meyer 2022-04-06 16:34:34 +02:00
parent 4f699395f4
commit 9225462262
3 changed files with 3 additions and 3 deletions

View File

@ -378,7 +378,7 @@ class SimpleQuery implements QueryInterface, Queryable, Iterator
$column = $this->flippedColumns[$column];
}
$result = strcmp(strtolower($a->$column ?: ''), strtolower($b->$column ?: ''));
$result = strcmp(strtolower($a->$column ?? ''), strtolower($b->$column ?? ''));
if ($result === 0) {
return $this->compare($a, $b, ++$orderIndex);
}

View File

@ -104,7 +104,7 @@ class View extends Zend_View_Abstract
*/
public function escape($value)
{
return htmlspecialchars($value ?: '', ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML5, self::CHARSET, true);
return htmlspecialchars($value ?? '', ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML5, self::CHARSET, true);
}
/**

View File

@ -158,7 +158,7 @@ class Zend_Form_Decorator_Description extends Zend_Form_Decorator_Abstract
}
$description = $element->getDescription();
$description = trim($description ?: '');
$description = trim($description ?? '');
if (!empty($description) && (null !== ($translator = $element->getTranslator()))) {
$description = $translator->translate($description);