MDL-76102 lib: PEAR - passing null to str functions is deprecated

This commit is contained in:
Marina Glancy
2022-10-27 07:36:26 +02:00
parent 35f39c45b7
commit 4b99c6a795
5 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -733,7 +733,7 @@ class HTML_QuickForm extends HTML_Common {
{
static $anonGroups = 1;
if (0 == strlen($name)) {
if (0 == strlen($name ?? '')) {
$name = 'qf_group_' . $anonGroups++;
$appendName = false;
}
@@ -813,6 +813,7 @@ class HTML_QuickForm extends HTML_Common {
function getSubmitValue($elementName)
{
$value = null;
$elementName = $elementName ?? '';
if (isset($this->_submitValues[$elementName]) || isset($this->_submitFiles[$elementName])) {
$value = isset($this->_submitValues[$elementName])? $this->_submitValues[$elementName]: array();
if (is_array($value) && isset($this->_submitFiles[$elementName])) {