View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20224Bug reportsOtherpublic2025-08-20 16:19
Reporterukj_shei Assigned Toc_schmitz  
PrioritynoneSeveritytrivial 
Status resolvedResolutionfixed 
Product Version6.5.x 
Summary20224: "Constant E_STRICT is deprecated" - PHP8.x with debug enabled
Description

When using PHP in version 8.x with debug enabled in the config.php file, the following error :

Constant E_STRICT is deprecated

/var/www/html/limesurvey6.15.6+250818/application/core/LSYii_Controller.php(138)

126 //GlobalSettings Helper
127 Yii::import("application.helpers.globalsettings");
128
129 enforceSSLMode(); // This really should be at the top but for it to utilise getGlobalSetting() it has to be here
130
131 if (Yii::app()->getConfig('debug') == 1) {
132 //For debug purposes - switch on in config.php
133 @ini_set("display_errors", '1');
134 error_reporting(E_ALL);
135 } elseif (Yii::app()->getConfig('debug') == 2) {
136 //For debug purposes - switch on in config.php
137 @ini_set("display_errors", '1');
138 error_reporting(E_ALL | E_STRICT);
139 } else {
140 @ini_set("display_errors", '0');
141 error_reporting(0);
142 }
143
144 //SET LOCAL TIME
145 $timeadjust = Yii::app()->getConfig("timeadjust");
146 if (substr((string) $timeadjust, 0, 1) != '-' && substr((string) $timeadjust, 0, 1) != '+') {
147 $timeadjust = '+' . $timeadjust;
148 }
149 if (strpos((string) $timeadjust, 'hours') === false && strpos((string) $timeadjust, 'minutes') === false && strpos((string) $timeadjust, 'days') === false) {
150 Yii::app()->setConfig("timeadjust", $timeadjust . ' hours');

Steps To Reproduce

Steps to reproduce

Using PHP 8.x and
set debug'=>1 in application/config/config.php

Expected result

Show in browser an error-message

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)6.15.x
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMariaDB 11.7.2
Server OS (if known)podman using default nginx and modified php-fpm images
Webserver software & version (if known)
PHP Version8.4.10

Users monitoring this issue

Mazi

Activities

c_schmitz

c_schmitz

2025-08-20 16:19

administrator   ~83260

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

Related Changesets

LimeSurvey: master f3755b7b

2025-08-20 16:19

c_schmitz


Details Diff
Fixed issue 20224: "Constant E_STRICT is deprecated" - PHP8.4 or later with debug enabled Affected Issues
20224
mod - application/core/LSYii_Controller.php Diff File
mod - setdebug.php Diff File
mod - tests/bootstrap.php Diff File

Issue History

Date Modified Username Field Change
2025-08-20 11:01 ukj_shei New Issue
2025-08-20 13:00 Mazi Issue Monitored: Mazi
2025-08-20 13:00 Mazi Bug heat 0 => 2
2025-08-20 16:19 c_schmitz Changeset attached => LimeSurvey master f3755b7b
2025-08-20 16:19 c_schmitz Note Added: 83260
2025-08-20 16:19 c_schmitz Assigned To => c_schmitz
2025-08-20 16:19 c_schmitz Status new => resolved
2025-08-20 16:19 c_schmitz Resolution open => fixed
2025-08-20 16:19 c_schmitz Bug heat 2 => 4