Skip to content

Commit

Permalink
Fixed issue: PHP7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Nov 5, 2018
1 parent cbca53d commit 3dda496
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/helpers/export_helper.php
Expand Up @@ -2633,9 +2633,9 @@ function tsvSurveyExport($surveyid){
* @param string $column_name
**/
function sortArrayByColumn(&$array, $column_name){
uasort($array, create_function('$a, $b', '
uasort($array, function($a,$b) {
return strnatcmp($a["' . $column_name . '"], $b["' . $column_name . '"]);
'));
});
}

/**
Expand Down
2 changes: 1 addition & 1 deletion framework/yiilite.php
Expand Up @@ -2799,7 +2799,7 @@ public function getPreferredLanguages()
if($q)
$languages[]=array((float)$q,$matches[1][$i]);
}
usort($languages,create_function('$a,$b','if($a[0]==$b[0]) {return 0;} return ($a[0]<$b[0]) ? 1 : -1;'));
usort($languages,function($a,$b) {if($a[0]==$b[0]) {return 0;} return ($a[0]<$b[0]) ? 1 : -1;});
foreach($languages as $language)
$sortedLanguages[]=$language[1];
}
Expand Down

0 comments on commit 3dda496

Please sign in to comment.