PHP error

preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

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

5041  * @param array|string $replacement
5042  * @param array|string $subject
5043  * @param int $limit
5044  * @param int $count    If specified, this variable will be filled with the total number of replacements done (including all iterations)
5045  * @param int $recursion_limit  Max number of iterations allowed
5046  * @return string|array
5047  */
5048 function recursive_preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0, $recursion_limit = 50)
5049 {
5050     if ($recursion_limit < 0) {
5051         return $subject;
5052     }
5053     $result = preg_replace($pattern, $replacement, $subject, $limit, $count);
5054     if ($count > 0) {
5055         $result = recursive_preg_replace($pattern, $replacement, $result, $limit, $auxCount, --$recursion_limit);
5056         $count += $auxCount;
5057     }
5058     return $result;
5059 }
5060 
5061 /**
5062  * Returns the standard deviation of supplied $numbers
5063  * @param array $numbers The numbers to calculate the standard deviation for
5064  * @return float
5065  */

Stack Trace

#0
+
 /media/shnoulle/data/webdev/master/application/helpers/common_helper.php(5053): preg_replace("~{[^}]*\K836422X286X2840(?=[^}]*?})~", "985911X41X257", null, -1, ...)
5048 function recursive_preg_replace($pattern, $replacement, $subject, $limit = -1, &$count = 0, $recursion_limit = 50)
5049 {
5050     if ($recursion_limit < 0) {
5051         return $subject;
5052     }
5053     $result = preg_replace($pattern, $replacement, $subject, $limit, $count);
5054     if ($count > 0) {
5055         $result = recursive_preg_replace($pattern, $replacement, $result, $limit, $auxCount, --$recursion_limit);
5056         $count += $auxCount;
5057     }
5058     return $result;
#1
+
 /media/shnoulle/data/webdev/master/application/helpers/common_helper.php(3611): recursive_preg_replace("~{[^}]*\K836422X286X2840(?=[^}]*?})~", "985911X41X257", null, -1, ...)
3606             $arGroup->save();
3607         }
3608         foreach ($arGroup->questiongroupl10ns as $arQuestionGroupLS) {
3609             foreach ($aCodeMap as $sOldCode => $sNewCode) {
3610                 $sOldCode = preg_quote((string) $sOldCode, '~');
3611                 $arQuestionGroupLS->description = recursive_preg_replace("~{[^}]*\K{$sOldCode}(?=[^}]*?})~", $sNewCode, $arQuestionGroupLS->description, -1, $iCount);
3612                 $bModified = $bModified || $iCount;
3613             }
3614             if ($bModified) {
3615                 $arQuestionGroupLS->save();
3616             }
#2
+
 /media/shnoulle/data/webdev/master/application/helpers/admin/import_helper.php(2451): replaceExpressionCodes(985911, array("836422X286X2840" => "985911X41X257", "836422X286X2840Q00" => "985911X41X257Q00"))
2446     $aOldNewFieldmap = reverseTranslateFieldNames($iOldSID, $iNewSID, $aGIDReplacements, $aQIDReplacements);
2447     $results['FieldReMap'] = $aOldNewFieldmap;
2448     LimeExpressionManager::SetSurveyId($iNewSID);
2449     translateInsertansTags($iNewSID, $iOldSID, $aOldNewFieldmap);
2450     replaceExpressionCodes($iNewSID, $aQuestionCodeReplacements);
2451     replaceExpressionCodes($iNewSID, $aQuestionsMapping); // replace question codes in format "38612X105X3011"
2452     if (count($aQuestionCodeReplacements)) {
2453         array_unshift($results['importwarnings'], "<span class='warningtitle'>" . gT('Attention: Several question codes were updated. Please check these carefully as the update  may not be perfect with customized expressions.') . '</span>');
2454     }
2455     LimeExpressionManager::RevertUpgradeConditionsToRelevance($iNewSID);
2456     LimeExpressionManager::UpgradeConditionsToRelevance($iNewSID);
2023-10-31 17:56:40 nginx/1.22.1 Yii Framework/1.1.28