View Issue Details

IDProjectCategoryView StatusLast Update
16917Development Otherpublic2021-02-24 10:36
Reportertammo Assigned Toc_schmitz  
PriorityhighSeveritycrash 
Status closedResolutionfixed 
Summary16917: PHP 8.0.0 crash when navigating to global settings
DescriptionArgumentCountError

mktime() expects at most 6 arguments, 7 given

E:\onderzoek.buurkracht.nl\application\helpers\adodb\adodb-time.inc_helper.php(725)

713
714 if ($ADODB_DATETIME_CLASS && $y !== false) {
715 $dt = new DateTime();
716 $dt->setISODate($y, $m, $d);
717 if (empty($tzo)) {
718 $tzo = new DateTimeZone(date_default_timezone_get());
719 # $tzt = timezone_transitions_get( $tzo );
720 }
721 return -$tzo->getOffset($dt);
722 } else {
723 if (isset($TZ)) return $TZ;
724 $y = date('Y');
725 $TZ = @mktime(0, 0, 0, 12, 2, $y, 0) - @gmmktime(0, 0, 0, 12, 2, $y, 0);
726 }
727
728 return $TZ;
729 }
730
731 /**
732 Returns an array with date info.
733 */
734 function adodb_getdate($d = false, $fast = false)
735 {
736 if ($d === false) return getdate();
737 if (!defined('ADODB_TEST_DATES')) {

Stack Trace
#0

 E:\onderzoek.buurkracht.nl\application\helpers\adodb\adodb-time.inc_helper.php(725): mktime(0, 0, 0, 12, ...)

720 }
721 return -$tzo->getOffset($dt);
722 } else {
723 if (isset($TZ)) return $TZ;
724 $y = date('Y');
725 $TZ = @mktime(0, 0, 0, 12, 2, $y, 0) - @gmmktime(0, 0, 0, 12, 2, $y, 0);
726 }
727
728 return $TZ;
729 }
730

#1

 E:\onderzoek.buurkracht.nl\application\helpers\adodb\adodb-time.inc_helper.php(1227): adodb_get_gmt_diff("2020", 1, 1)

1222 return $is_gmt ?
1223 @gmmktime($hr, $min, $sec, $mon, $day, $year) : @mktime($hr, $min, $sec, $mon, $day, $year);
1224 }
1225 }
1226
1227 $gmt_different = ($is_gmt) ? 0 : adodb_get_gmt_diff($year, $mon, $day);
1228
1229 /*
1230 # disabled because some people place large values in $sec.
1231 # however we need it for $mon because we use an array...
1232 $hr = intval($hr);

#2

 E:\onderzoek.buurkracht.nl\application\libraries\Date_Time_Converter.php(356): adodb_mktime(1, 0, 0, 1, ...)

351 (int) ltrim($this->hours, "0"),
352 (int) ltrim($this->minutes, "0"),
353 (int) ltrim($this->seconds, "0"),
354 (int) ltrim($this->months, "0"),
355 (int) ltrim($this->days, "0"),
356 (int) ltrim($this->years, "0")
357 );
358
359 return $make_stamp;
360 }
361

#3
+
 E:\onderzoek.buurkracht.nl\application\libraries\Date_Time_Converter.php(73): Date_Time_Converter->_date_to_timestamp("1970-01-01 01:00:00", "YYYY-mm-dd HH:ii:ss")
#4
+
 E:\onderzoek.buurkracht.nl\application\controllers\admin\globalsettings.php(76): Date_Time_Converter->__construct("1970-01-01 01:00:00", "Y-m-d H:i:s")
#5
+
 E:\onderzoek.buurkracht.nl\application\controllers\admin\globalsettings.php(46): GlobalSettings->_displaySettings()
#6
 unknown(0): GlobalSettings->index()
#7
+
 E:\onderzoek.buurkracht.nl\framework\web\actions\CAction.php(109): ReflectionMethod->invokeArgs(GlobalSettings, array())
#8
+
 E:\onderzoek.buurkracht.nl\application\core\Survey_Common_Action.php(83): CAction->runWithParamsInternal(GlobalSettings, ReflectionMethod, array())
#9
+
 E:\onderzoek.buurkracht.nl\framework\web\CController.php(308): Survey_Common_Action->runWithParams(array())
#10
+
 E:\onderzoek.buurkracht.nl\framework\web\CController.php(286): CController->runAction(GlobalSettings)
#11
+
 E:\onderzoek.buurkracht.nl\framework\web\CController.php(265): CController->runActionWithFilters(GlobalSettings, array())
#12
+
 E:\onderzoek.buurkracht.nl\application\controllers\AdminController.php(165): CController->run("globalsettings")
#13
+
 E:\onderzoek.buurkracht.nl\framework\web\CWebApplication.php(282): AdminController->run("globalsettings")
#14
+
 E:\onderzoek.buurkracht.nl\framework\web\CWebApplication.php(141): CWebApplication->runController("admin/globalsettings")
#15
+
 E:\onderzoek.buurkracht.nl\framework\base\CApplication.php(185): CWebApplication->processRequest()
#16
+
 E:\onderzoek.buurkracht.nl\index.php(194): CApplication->run()
TagsPHP 8

Activities

tammo

tammo

2020-12-20 10:07

partner  

tammo

tammo

2020-12-20 10:15

partner   ~61009

Furthermore:

Deprecated: Function libxml_disable_entity_loader() is deprecated in E:\onderzoek.buurkracht.nl\application\models\AdminTheme.php on line 105

Deprecated: Function libxml_disable_entity_loader() is deprecated in E:\onderzoek.buurkracht.nl\application\models\AdminTheme.php on line 118

Deprecated: Required parameter $destinationBuild follows optional parameter $updateKey in E:\onderzoek.buurkracht.nl\application\models\UpdateForm.php on line 99
DenisChenu

DenisChenu

2020-12-22 15:01

developer   ~61022

PHP8 … maybe need a tag ;)
c_schmitz

c_schmitz

2021-02-15 13:26

administrator   ~62242

if (\PHP_VERSION_ID < 80000) {
    libxml_disable_entity_loader(true);
}
DenisChenu

DenisChenu

2021-02-15 14:38

developer   ~62250

Still need adodb helper ?
Can not move whole to Yii ?
c_schmitz

c_schmitz

2021-02-16 14:42

administrator   ~62285

We would have to replace Date_Time_Converter everywhere.
c_schmitz

c_schmitz

2021-02-16 14:46

administrator   ~62286

Fix committed to 3.x-LTS branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31100
c_schmitz

c_schmitz

2021-02-16 15:02

administrator   ~62288

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31101
c_schmitz

c_schmitz

2021-02-16 15:05

administrator   ~62289

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31102
c_schmitz

c_schmitz

2021-02-16 15:36

administrator   ~62290

See also https://github.com/limesurvey/limesurvey/commit/0f8dcc2ec477125117c775db6a63bc5bd110683f
lime_release_bot

lime_release_bot

2021-02-24 10:36

administrator   ~62482

Fixed in Release 4.4.9+210219

Related Changesets

LimeSurvey: 3.x-LTS 5a72cccb

2021-02-16 14:46:25

c_schmitz

Details Diff
Fixed issue 16917: Error when navigating to global settings and using PHP8 Affected Issues
16917
mod - application/controllers/admin/export.php Diff File
mod - application/core/LSYii_Application.php Diff File
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/adodb/adodb-time.inc_helper.php Diff File
mod - application/helpers/questionHelper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - application/models/AdminTheme.php Diff File
mod - application/models/TemplateManifest.php Diff File
mod - application/models/UpdateForm.php Diff File

LimeSurvey: master 66f89f45

2021-02-16 15:02:25

c_schmitz

Details Diff
Fixed issue 16917: Error when navigating to global settings and using PHP8
Dev PHP compatibility fixes
Affected Issues
16917
mod - application/config/fonts.php Diff File
mod - application/controllers/admin/PermissiontemplatesController.php Diff File
mod - application/controllers/admin/export.php Diff File
mod - application/core/LSYii_Application.php Diff File
mod - application/helpers/admin/import_helper.php Diff File
mod - application/helpers/adodb/adodb-time.inc_helper.php Diff File
mod - application/helpers/remotecontrol/remotecontrol_handle.php Diff File
mod - application/libraries/ExtensionInstaller/ThemeUpdater.php Diff File
mod - application/libraries/PluginManager/PluginBase.php Diff File
mod - application/models/AdminTheme.php Diff File
mod - application/models/Plugin.php Diff File
mod - application/models/QuestionAttribute.php Diff File
mod - application/models/QuestionBaseDataSet.php Diff File
mod - application/models/QuestionTheme.php Diff File
mod - application/models/TemplateManifest.php Diff File
mod - application/models/UpdateForm.php Diff File
mod - tests/unit/controllers/ParticipantActionTest.php Diff File

LimeSurvey: master 52bdb90a

2021-02-16 15:05:43

c_schmitz

Details Diff
Fixed issue 16917: Error when navigating to global settings and using PHP8
Dev PHP compatibility fixes
Affected Issues
16917
mod - application/models/ExtensionConfig.php Diff File

Issue History

Date Modified Username Field Change
2020-12-20 10:07 tammo New Issue
2020-12-20 10:07 tammo File Added: Firefox_Screenshot_2020-12-20T09-03-18.139Z.png
2020-12-20 10:15 tammo Note Added: 61009
2020-12-21 10:35 cdorin Priority none => high
2020-12-21 10:35 cdorin Status new => confirmed
2020-12-22 15:01 DenisChenu Note Added: 61022
2020-12-22 15:02 DenisChenu Tag Attached: PHP 8
2021-02-11 18:54 ollehar Project Bug reports => Development
2021-02-15 13:26 c_schmitz Note Added: 62242
2021-02-15 14:38 DenisChenu Note Added: 62250
2021-02-16 14:42 c_schmitz Note Added: 62285
2021-02-16 14:44 c_schmitz Assigned To => c_schmitz
2021-02-16 14:44 c_schmitz Status confirmed => assigned
2021-02-16 14:46 c_schmitz Changeset attached => LimeSurvey 3.x-LTS 5a72cccb
2021-02-16 14:46 c_schmitz Note Added: 62286
2021-02-16 14:46 c_schmitz Resolution open => fixed
2021-02-16 15:02 c_schmitz Changeset attached => LimeSurvey master 66f89f45
2021-02-16 15:02 c_schmitz Note Added: 62288
2021-02-16 15:03 c_schmitz Status assigned => resolved
2021-02-16 15:05 c_schmitz Changeset attached => LimeSurvey master 52bdb90a
2021-02-16 15:05 c_schmitz Note Added: 62289
2021-02-16 15:36 c_schmitz Note Added: 62290
2021-02-24 10:36 lime_release_bot Note Added: 62482
2021-02-24 10:36 lime_release_bot Status resolved => closed