| @@ -15,8 +15,11 @@ | ||
| 15 | 15 | private $_fieldHelpers; |
| 16 | 16 | |
| 17 | 17 | public function __construct($field, $rowID, $field_name, $form_atomic_Cls_map, $formID, $error = null, $value = null) |
| 18 | 18 | { |
| 19 | + // Corrupt/partial form JSON can hand us a null field; normalize so | |
| 20 | + // property_exists() calls never receive null (PHP 8 TypeError). | |
| 21 | + $field = is_object($field) ? $field : new \stdClass(); | |
| 19 | 22 | $this->_fieldData = $field; |
| 20 | 23 | $this->_fieldKey = $rowID; |
| 21 | 24 | $this->_fieldName = $field_name; |
| 22 | 25 | $this->_formID = $formID; |
| @@ -144,9 +147,9 @@ | ||
| 144 | 147 | ); |
| 145 | 148 | } |
| 146 | 149 | |
| 147 | 150 | // for subtitle |
| 148 | - if (property_exists($this->_fieldData, 'subtitle') && $this->_fieldData->subtitleHide) { | |
| 151 | + if (property_exists($this->_fieldData, 'subtitle') && !empty($this->_fieldData->subtitleHide)) { | |
| 149 | 152 | $_subtitle = sprintf( |
| 150 | 153 | '<div %1$s class="%2$s %3$s">%4$s%5$s%6$s</div>', |
| 151 | 154 | $this->_fieldHelpers->getCustomAttributes('sub-titl'), |
| 152 | 155 | $this->_fieldHelpers->getAtomicCls('sub-titl'), |