View Issue Details

IDProjectCategoryView StatusLast Update
12993Bug reports[All Projects] Otherpublic2019-04-30 09:11
Reporteralex2k Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.15.x 
Target VersionFixed in Version3.17.x 
Summary12993: PHP-function create_function() has been deprecated
Description

The PHP-function create_function() has been deprecated as of PHP 7.2.0 (https://wiki.php.net/rfc/deprecations_php_7_2#create_function), but is still used in Limesurvey:

framework/web/CHttpRequest.php: usort($languages,create_function('$a,$b','if($a[0]==$b[0]) {return 0;} return ($a[0]<$b[0]) ? 1 : -1;'));
framework/logging/CProfileLogRoute.php: $func=create_function('$a,$b','return $a[4]<$b[4]?1:0;');
framework/yiilite.php: usort($languages,create_function('$a,$b','if($a[0]==$b[0]) {return 0;} return ($a[0]<$b[0]) ? 1 : -1;'));
framework/vendors/markdown/markdown.php: $this->utf8_strlen = create_function('$text', 'return preg_match_all(
application/helpers/common_helper.php: $text = preg_replace_callback ('@<script[^>]?>.?</script>@si', create_function(
application/helpers/common_helper.php: uksort($fieldnames, create_function('$a,$b', 'return strlen($a) < strlen($b);'));
application/helpers/expressions/em_core_helper.php: $iNumArg=count(array_filter(array($hour,$minute,$second,$month,$day,$year),create_function('$a','return $a !== null;')));

TagsNo tags attached.
Complete LimeSurvey version number (& build)2.72.5+171121
I will donate to the project if issue is resolvedNo
Browser
Database & DB-VersionMariaDB 10.2
Server OS (if known)RHEL 7
Webserver software & version (if known)Apache 2.4
PHP Version7.2.0

Activities

bismark

bismark

2019-04-03 11:00

reporter   ~51293

upgrading to yii 1.1.21 should resolve this issue

DenisChenu

DenisChenu

2019-04-03 11:10

developer   ~51295

Last edited: 2019-04-03 12:06

View 2 revisions

For framework/logging/CProfileLogRoute.php it's not fixed in https://github.com/LimeSurvey/LimeSurvey/commit/6dce75c84a3c37c8c5a6cc29f81cb1375c429630 (meged in develop) ?

BUT : right : update to last Yii is better

DenisChenu

DenisChenu

2019-04-03 14:27

developer   ~51310

For Yii : https://github.com/LimeSurvey/LimeSurvey/pull/1254

DenisChenu

DenisChenu

2019-04-03 14:30

developer   ~51311

Last edited: 2019-04-03 14:39

View 2 revisions

application/helpers/common_helper.php: $text = preg_replace_callback ('@&lt;script[^>]?>.?&lt;/script>@si', create_function( not currently neither in develop or master
application/helpers/common_helper.php: uksort($fieldnames, create_function('$a,$b', 'return strlen($a) &lt; strlen($b);')); not currently neither in develop or master
application/helpers/expressions/em_core_helper.php: $iNumArg=count(array_filter(array($hour,$minute,$second,$month,$day,$year),create_function('$a','return $a !== null;'))); not currently neither in develop or master

Please : report always with the last version from GIT …

[edit] Sorry didn't see it's an old issue 2017-12-06 10:43

DenisChenu

DenisChenu

2019-04-03 17:06

developer   ~51317

https://github.com/LimeSurvey/LimeSurvey/commit/9cb60ed801bc539d76a51b7a33ebda48b84ffff1

bismark

bismark

2019-04-03 17:10

reporter   ~51318

thanx

DenisChenu

DenisChenu

2019-04-03 18:12

developer   ~51321

And we can merge request on Yii next time ;)

Issue History

Date Modified Username Field Change
2017-12-06 10:43 alex2k New Issue
2018-05-23 11:25 LouisGac Target Version => 4.0.0dev
2019-04-03 11:00 bismark Note Added: 51293
2019-04-03 11:10 DenisChenu Note Added: 51295
2019-04-03 11:22 cdorin Status new => confirmed
2019-04-03 12:06 DenisChenu Note Edited: 51295 View Revisions
2019-04-03 14:27 DenisChenu Note Added: 51310
2019-04-03 14:30 DenisChenu Note Added: 51311
2019-04-03 14:38 DenisChenu Assigned To => DenisChenu
2019-04-03 14:38 DenisChenu Status confirmed => assigned
2019-04-03 14:39 DenisChenu Product Version => 3.15.x
2019-04-03 14:39 DenisChenu Target Version 4.0.0dev =>
2019-04-03 14:39 DenisChenu Note Edited: 51311 View Revisions
2019-04-03 17:06 DenisChenu Status assigned => resolved
2019-04-03 17:06 DenisChenu Resolution open => fixed
2019-04-03 17:06 DenisChenu Fixed in Version => 3.17.x
2019-04-03 17:06 DenisChenu Note Added: 51317
2019-04-03 17:10 bismark Note Added: 51318
2019-04-03 18:12 DenisChenu Note Added: 51321
2019-04-30 09:11 c_schmitz Status resolved => closed