PHP error

json_decode(): Passing null to parameter #1 ($json) of type string is deprecated

/media/shnoulle/data/webdev/master/application/helpers/common_helper.php(4559)

4547     $ans = str_replace(array('{', '}'), array('{ ', ' }'), $ans);
4548     return $ans;
4549 }
4550 
4551 /**
4552  * Decode a json string, sometimes needs stripslashes
4553  *
4554  * @param string $jsonString
4555  * @return mixed
4556  */
4557 function json_decode_ls($jsonString)
4558 {
4559     $decoded = json_decode($jsonString, true);
4560 
4561     if (is_null($decoded) && !empty($jsonString)) {
4562         // probably we need stipslahes
4563         $decoded = json_decode(stripslashes($jsonString), true);
4564     }
4565 
4566     return $decoded;
4567 }
4568 
4569 /**
4570  * Return accepted codingsArray for importing files
4571  *

Stack Trace

#0
+
 /media/shnoulle/data/webdev/master/application/helpers/common_helper.php(4559): json_decode(null, true)
4554  * @param string $jsonString
4555  * @return mixed
4556  */
4557 function json_decode_ls($jsonString)
4558 {
4559     $decoded = json_decode($jsonString, true);
4560 
4561     if (is_null($decoded) && !empty($jsonString)) {
4562         // probably we need stipslahes
4563         $decoded = json_decode(stripslashes($jsonString), true);
4564     }
#1
+
 /media/shnoulle/data/webdev/master/application/models/SurveyDynamic.php(408): json_decode_ls(null)
403 
404         // Upload question
405         if ($oFieldMap->type == Question::QT_VERTICAL_FILE_UPLOAD && strpos((string) $oFieldMap->fieldname, 'filecount') === false) {
406             $sSurveyEntry = "<table class='table table-condensed upload-question'>";
407             $aQuestionAttributes = QuestionAttribute::model()->getQuestionAttributes($oFieldMap->qid);
408             $aFilesInfo = json_decode_ls($this->$colName);
409             if (!empty($aFilesInfo)) {
410                 foreach ($aFilesInfo as $iFileIndex => $fileInfo) {
411                     if (empty($fileInfo)) {
412                         continue;
413                     }
#2
 /media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CComponent.php(612) : eval()'d code(1): SurveyDynamic->getExtendedData("416742X277X2679", "en", "eyJmaWVsZG5hbWUiOiI0MTY3NDJYMjc3WDI2NzkiLCJ0eXBlIjoifCIsInNpZCI6...")
2025-08-26 15:48:36 nginx/1.22.1 Yii Framework/1.1.31