View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20660Bug reportsQuestion editorpublic2026-09-04 15:48
ReporterAnnaAfter Assigned Toc_schmitz  
PrioritynoneSeverityfeature 
Status feedbackResolutionopen 
Summary20660: A server-side error was reported in a supplier survey.
Description

Our survey returned an internal 500 server error. It was related to the LimeSurvey platform rather than a single questionnaire.
Based on the available survey configuration the error was the file attachment (File Upload) field.
The survey contained an attachment question where respondents could upload supporting documents. During processing, LimeSurvey attempted to evaluate or validate the field value as if it were a numeric value. However, the attachment field returns text-based data (such as file metadata, filenames, or JSON content), which can cause calculation or validation functions to fail.
The issue became particularly visible when a respondent uploaded the maximum allowed number of attachments. In that scenario, the attachment field returned a larger structured value, and LimeSurvey failed while processing the response, resulting in an HTTP 500 error and a PHP exception similar to:fmod(): Argument #1 ($num1) must be of type float, string given.
As a result, survey submission failed even though the uploaded files themselves were valid.
The attachment field configuration was changed, especially:Maximum number of files allowed.
Reducing the maximum number of attachments or removing the attachment field from calculations and validation expressions should prevent the error from occurring again.
Note: The root-cause section above is based on the investigation and troubleshooting conclusions discussed around the issue. The enterprise search results confirm the existence of the LimeSurvey-related server error but do not contain a detailed technical diagnosis of the attachment-field processing failure.

Steps To Reproduce

Create a new survey
Set up a simple test survey with at least one question group.
Add a File Upload question
Insert a File Upload question (type: “File upload”) into the survey.
Do not Set maximum number of files to a value
Activate the survey
Make the survey live so that LimeSurvey processes responses normally.
The server returns:
HTTP 500 Internal Server Error
PHP exception similar to:
fmod(): Argument #1 ($num1) must be of type float, string given

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)6.16.9&260217
I will donate to the project if issue is resolvedNo
Story point estimate0
Browser
Database type & version10.5.29-MariaDB
Server OS (if known)
Webserver software & version (if known)
PHP Version 8.2.32

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2026-08-31 19:42

administrator   ~85528

Can you enable debug = 2 in application/config/config.php and try again, please? Paste the complete error message here.

AnnaAfter

AnnaAfter

2026-09-04 12:27

reporter   ~85564

Hi. with debug =2 here's the PHP warning
Undefined array key "p"
/var/www/html/limesurvey-prod/limesurvey/application/helpers/surveytranslator_helper.php(1370)
Stack Trace
#0

/var/www/html/limesurvey-prod/limesurvey/application/helpers/frontend_helper.php(205): getLanguageDataRestricted(true)

200 @param string $sSelectedLanguage The language in which all information is shown201 @return array|bool202 */203 function getLanguageChangerDatasPublicList($sSelectedLanguage)204 {205 $aLanguages = getLanguageDataRestricted(true); // Order by native206 if (count($aLanguages) > 1) {207 $sClass = "ls-language-changer-item";208 foreach ($aLanguages as $sLangCode => $aLanguage) {209 $aListLang[$sLangCode] = html_entity_decode((string) $aLanguage['nativedescription'], ENT_COMPAT, 'UTF-8') . ' - ' . $aLanguage['description'];210 }

#1

/var/www/html/limesurvey-prod/limesurvey/application/controllers/SurveysController.php(49): getLanguageChangerDatasPublicList("pl")

44 'bShowClearAll' => false,45 'surveyls_title' => Yii::app()->getConfig('sitename')46 );4748 $aData['alanguageChanger']['show'] = false;49 $alanguageChangerDatas = getLanguageChangerDatasPublicList(App()->language);5051 if ($alanguageChangerDatas) {52 $aData['alanguageChanger']['show'] = true;53 $aData['alanguageChanger']['datas'] = $alanguageChangerDatas;54 }

#2
unknown(0): SurveysController->actionPublicList("pl")

#3
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/actions/CAction.php(114): ReflectionMethod->invokeArgs(SurveysController, array(null))

#4
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(SurveysController, ReflectionMethod, array())

#5
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array())

#6
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(CInlineAction)

#7
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())

#8
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("")

#9
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("")

#10
+
/var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()

#11

/var/www/html/limesurvey-prod/limesurvey/index.php(161): CApplication->run()

156 require_once APPPATH . 'core/LSYii_Application' . EXT;157158 $config = require_once(APPPATH . 'config/internal' . EXT);159160 Yii::$enableIncludePath = false;161 Yii::createApplication('LSYii_Application', $config)->run();162163 / End of file index.php /164 / Location: ./index.php /
2026-09-04 10:18:27 Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k Yii Framework/1.1.31

PHP warning.txt (4,296 bytes)   
PHP warning
Undefined array key "p"

/var/www/html/limesurvey-prod/limesurvey/application/helpers/surveytranslator_helper.php(1370)

1358     if (empty($languageData[$sLocale]['momentjs'])) {
1359         return 'en';
1360     }
1361     return $languageData[$sLocale]['momentjs'];
1362 }
1363 
1364 function getLanguageDataRestricted($bOrderByNative = false, $sDetail = 'full')
1365 {
1366     $aLanguageData = getLanguageData($bOrderByNative);
1367 
1368     if (trim((string) Yii::app()->getConfig('restrictToLanguages')) != '') {
1369         foreach (explode(' ', trim((string) Yii::app()->getConfig('restrictToLanguages'))) as $key) {
1370             $aResult[$key] = $aLanguageData[$key];
1371         }
1372     } else {
1373         $aResult = $aLanguageData;
1374     }
1375     if ($sDetail == 'short') {
1376         foreach ($aResult as $sKey => $aLanguageData) {
1377             $aNewArray[$sKey] = $aLanguageData['description'];
1378         }
1379         $aResult = $aNewArray;
1380     }
1381     return $aResult;
1382 }
Stack Trace
#0  
–  /var/www/html/limesurvey-prod/limesurvey/application/helpers/frontend_helper.php(205): getLanguageDataRestricted(true)
200  * @param string $sSelectedLanguage The language in which all information is shown
201  * @return array|bool
202  */
203 function getLanguageChangerDatasPublicList($sSelectedLanguage)
204 {
205     $aLanguages = getLanguageDataRestricted(true); // Order by native
206     if (count($aLanguages) > 1) {
207         $sClass = "ls-language-changer-item";
208         foreach ($aLanguages as $sLangCode => $aLanguage) {
209                     $aListLang[$sLangCode] = html_entity_decode((string) $aLanguage['nativedescription'], ENT_COMPAT, 'UTF-8') . ' - ' . $aLanguage['description'];
210         }
#1  
–  /var/www/html/limesurvey-prod/limesurvey/application/controllers/SurveysController.php(49): getLanguageChangerDatasPublicList("pl")
44             'bShowClearAll'     => false,
45             'surveyls_title'    => Yii::app()->getConfig('sitename')
46         );
47 
48         $aData['alanguageChanger']['show'] = false;
49         $alanguageChangerDatas = getLanguageChangerDatasPublicList(App()->language);
50 
51         if ($alanguageChangerDatas) {
52             $aData['alanguageChanger']['show']  = true;
53             $aData['alanguageChanger']['datas'] = $alanguageChangerDatas;
54         }
#2  
unknown(0): SurveysController->actionPublicList("pl")
#3  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/actions/CAction.php(114): ReflectionMethod->invokeArgs(SurveysController, array(null))
#4  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(SurveysController, ReflectionMethod, array())
#5  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array())
#6  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(CInlineAction)
#7  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#8  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("")
#9  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("")
#10  
+  /var/www/html/limesurvey-prod/limesurvey/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#11  
–  /var/www/html/limesurvey-prod/limesurvey/index.php(161): CApplication->run()
156 require_once APPPATH . 'core/LSYii_Application' . EXT;
157 
158 $config = require_once(APPPATH . 'config/internal' . EXT);
159 
160 Yii::$enableIncludePath = false;
161 Yii::createApplication('LSYii_Application', $config)->run();
162 
163 /* End of file index.php */
164 /* Location: ./index.php */
2026-09-04 10:18:27 Apache/2.4.37 (Red Hat Enterprise Linux) OpenSSL/1.1.1k Yii Framework/1.1.31
PHP warning.txt (4,296 bytes)   
c_schmitz

c_schmitz

2026-09-04 15:43

administrator   ~85571

The error in your debug log seems to be a completely different error than described. It is uncertain if they are connected as it is 'only' a warning.

c_schmitz

c_schmitz

2026-09-04 15:48

administrator   ~85574

I fixed the warning from your debug log in 20671.
Please download next weeks release with the fix, then try again to reproduce with debug=2.

Issue History

Date Modified Username Field Change
2026-08-26 10:49 AnnaAfter New Issue
2026-08-26 10:49 AnnaAfter File Added: limesurvey_survey_949849.lss
2026-08-31 19:42 c_schmitz Note Added: 85528
2026-08-31 19:42 c_schmitz Bug heat 0 => 2
2026-08-31 19:42 c_schmitz Assigned To => c_schmitz
2026-08-31 19:42 c_schmitz Status new => feedback
2026-09-04 12:27 AnnaAfter Note Added: 85564
2026-09-04 12:27 AnnaAfter File Added: PHP warning.txt
2026-09-04 12:27 AnnaAfter Bug heat 2 => 4
2026-09-04 12:27 AnnaAfter Status feedback => assigned
2026-09-04 15:43 c_schmitz Note Added: 85571
2026-09-04 15:44 c_schmitz Issue cloned: 20671
2026-09-04 15:48 c_schmitz Status assigned => feedback
2026-09-04 15:48 c_schmitz Note Added: 85574