Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #19217: PHP8 Error Type NULL (#3666)
* Fixed: 19217 Update Survey.php $attdescriptiondata = decodeTokenAttributes($this->attributedescriptions ?? ''); change to $attdescriptiondata = decodeTokenAttributes($this->attributedescriptions ?? []); In PHP 7 it is a warning in PHP 8 it's a 500! parameter key() must be an array!! * Fixed 10217: Update common_helper.php $aSavedExtraTokenFields = Survey::model()->findByPk($surveyid)->tokenAttributes; change to: $aSavedExtraTokenFields = Survey::model()->findByPk($surveyid)->tokenAttributes ?? []; In PHP 7 it is a warning in PHP 8 it's a 500! $aSavedExtraTokenFields is not allowed to be NULL anymore! in function array_intersect_key()! * Update common_helper.php Corrected code line 2946 * #19217: Update Survey.php revert back to from ?? [] to ?? '' on line 667 * #19217: Update Survey.php Extra check on first element of array If it is not an array set array to NULL * #19217: Update Survey.php Final edit after line 667: Check on array after reset(array) * #19217: Update Survey.php And some missing spaces... this one should pass!!!
- Loading branch information