View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update | 
|---|---|---|---|---|---|
| 17568 | Bug reports | Other | public | 2021-09-03 14:02 | 2021-11-10 07:42 | 
| Reporter | jr_limesurvery_statconsult_de | Assigned To | p_teichmann | ||
| Priority | none | Severity | block | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 5.x | ||||
| Summary | 17568: PHP Error[2]: Invalid argument supplied for foreach() ... updatedb_helper.php at line 4954 / function decryptArchivedTables450 | ||||
| Description | We're running 5.0.8 ... php ls5/application/commands/console.php updatedb so this was obviously introduced with:  | ||||
| Steps To Reproduce | Always reproducible ... try updating pre 5.0.11 versions to 5.0.11 or newer.  | ||||
| Additional Information | possibly somewhat related to what someone reported here too (at least syntax related):  | ||||
| Tags | No tags attached. | ||||
| Bug heat | 20 | ||||
| Complete LimeSurvey version number (& build) | 5.0.10 / 210723 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | FF | ||||
| Database type & version | PostgreSQL 11 / 11.12-0+deb10u1 | ||||
| Server OS (if known) | Debian Buster x64 / 10.10 | ||||
| Webserver software & version (if known) | Apache / 2.4.38-3+deb10u5 | ||||
| PHP Version | PHP7 / 7.3.29-1~deb10u1 | ||||
| duplicate of | 17476 | closed | p_teichmann | error Invalid argument supplied for foreach() in tokens.php(2584) when I reimport old Tokens | 
| has duplicate | 17576 | closed | p_teichmann | PHP Error[8]: Undefined index: type ... updatedb_helper.php at line 4708 | 
| 
	 Please try with latest version Release 5.1.5  | 
|
| 
	 We did try that ofcourse too (see above) - but just for completeness: Update pgsql:host=localhost;port=5432;user=aaa;password=secret;dbname=aaa; with prefix :lime_ from 449 to 471 the function where it breaks did not change in between...  | 
|
| 
	 Are you running this with debug = 2 or = 0 in config.php?  | 
|
| 
	 this is with debug = 0 in config.php  | 
|
| 
	 Thank you.  | 
|
| 
	 FWIW ... var_dump($archivedTableSettingsArray); added just before the foreach loop - gives: array(2) {  | 
|
| 
	 A fix for this is already in progress as part of another task, we will give an update when it’s ready.  | 
|
| 
	 Message from reporter: just checked with 5.1.7. It unfortunately still does not work when it comes to updating the database - it now emits: php limesurvey5.1.7210908/application/commands/console.php updatedb  | 
|
| 
	 New version released.  | 
|
| 
	 Message from reporter: Trying 5.1.9 it now emits: php ls5/application/commands/console.php updatedb  | 
|
| 
	 Providing the database would require me to deal with things that need to be anonymized before... so I'd like to prevent this. However - I tried debugging it further and I guess I've found something (application/helpers/update/updatedb_helper.php): print_r($archivedTableSettings); print_r($archivedTableSettingsProperties); So - $archivedTableSettingsProperties exists - but it does not have an index 0 (it's literally empty) - so it's at least clear why this error comes up. Tried this now: diff -Naur limesurvey5.1.9_210912.dist/application/helpers/update/updatedb_helper.php limesurvey5.1.9_210912/application/helpers/update/updatedb_helper.php 
 and I do come past this error now... with: php limesurvey5.1.9210912/application/commands/console.php updatedb Which looks good to me - at least a first glance. Questions: thanks...  | 
|
| 
	 Any chance that someone still could have a look into this?! I just tried 5.1.14 too - but the issue is still the same.  | 
|
| 
	 FWIW... I just saw another recent commit which seems to deal with something similiar when upgrading an older db to 450. https://github.com/LimeSurvey/LimeSurvey/commit/20991add684a0a717deda5d66394b3382d5ff3c3  | 
|
| 
	 Hello, As to your questions:  | 
|
| 
	 Just confirmed that this issue exists, we will update the code accordingly. The reason we no longer got bug reports is that if you are running in "config=0" mode the error will be ignored, which is fine in this case. However, the proper fix would be to replace "$archivedTableSettingsProperties[0]" with "reset($archivedTableSettingsProperties)", since we are working with a mix of normal arrays and associative once. If you want it to work before update, replace the mentioned code accordingly or change debug mode to 0  | 
|
| 
	 Dear all, php limesurvey5.1.16211020/application/commands/console.php updatedb FWIW - is there anything I can provide to get things sorted - apart from the whole database...?!  | 
|
| 
	 Unfortunately, the fixed was never merged due to missing code review. We hope it will be included on Monday's release. Sorry for the delay.  | 
|
| 
	 Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=32815  | 
|
| Date Modified | Username | Field | Change | 
|---|---|---|---|
| 2021-09-03 14:02 | jr_limesurvery_statconsult_de | New Issue | |
| 2021-09-03 14:04 | ollehar | Assigned To | => ollehar | 
| 2021-09-03 14:04 | ollehar | Status | new => feedback | 
| 2021-09-03 14:04 | ollehar | Note Added: 66312 | |
| 2021-09-03 14:04 | ollehar | Bug heat | 0 => 2 | 
| 2021-09-03 14:42 | jr_limesurvery_statconsult_de | Note Added: 66314 | |
| 2021-09-03 14:42 | jr_limesurvery_statconsult_de | Bug heat | 2 => 4 | 
| 2021-09-03 14:42 | jr_limesurvery_statconsult_de | Status | feedback => assigned | 
| 2021-09-03 14:44 | ollehar | Note Added: 66315 | |
| 2021-09-03 14:47 | c_schmitz | Status | assigned => feedback | 
| 2021-09-03 14:49 | jr_limesurvery_statconsult_de | Note Added: 66316 | |
| 2021-09-03 14:49 | jr_limesurvery_statconsult_de | Status | feedback => assigned | 
| 2021-09-03 14:50 | ollehar | Sync to Zoho Project | => |Yes| | 
| 2021-09-03 14:51 | ollehar | Note Added: 66317 | |
| 2021-09-03 15:19 | jr_limesurvery_statconsult_de | Note Added: 66319 | |
| 2021-09-03 15:50 | p_teichmann | Note Added: 66321 | |
| 2021-09-03 15:50 | p_teichmann | Bug heat | 4 => 6 | 
| 2021-09-07 10:12 | p_teichmann | Relationship added | duplicate of 17476 | 
| 2021-09-07 10:28 | p_teichmann | Assigned To | ollehar => p_teichmann | 
| 2021-09-07 10:28 | p_teichmann | Status | assigned => resolved | 
| 2021-09-07 10:28 | p_teichmann | Resolution | open => duplicate | 
| 2021-09-07 10:28 | p_teichmann | Note Added: 66374 | |
| 2021-09-07 15:21 | c_schmitz | Status | resolved => feedback | 
| 2021-09-07 15:21 | c_schmitz | Resolution | duplicate => reopened | 
| 2021-09-07 15:22 | c_schmitz | Relationship added | has duplicate 17576 | 
| 2021-09-07 15:22 | c_schmitz | Bug heat | 6 => 12 | 
| 2021-09-07 15:22 | c_schmitz | Note Added: 66375 | |
| 2021-09-07 15:22 | c_schmitz | Bug heat | 12 => 14 | 
| 2021-09-07 15:22 | c_schmitz | Note Edited: 66375 | |
| 2021-09-07 15:23 | c_schmitz | Status | feedback => assigned | 
| 2021-09-08 09:58 | c_schmitz | Status | assigned => resolved | 
| 2021-09-08 09:58 | c_schmitz | Resolution | reopened => fixed | 
| 2021-09-08 09:58 | c_schmitz | Note Added: 66392 | |
| 2021-09-08 09:59 | c_schmitz | Status | resolved => closed | 
| 2021-09-09 08:37 | c_schmitz | Bug heat | 14 => 20 | 
| 2021-09-09 08:37 | c_schmitz | Note Added: 66412 | |
| 2021-09-09 08:37 | c_schmitz | Status | closed => feedback | 
| 2021-09-09 08:37 | c_schmitz | Resolution | fixed => reopened | 
| 2021-09-09 21:39 | jr_limesurvery_statconsult_de | Note Added: 66440 | |
| 2021-09-09 21:39 | jr_limesurvery_statconsult_de | Status | feedback => assigned | 
| 2021-09-30 15:49 | jr_limesurvery_statconsult_de | Note Added: 66694 | |
| 2021-09-30 16:59 | jr_limesurvery_statconsult_de | Note Added: 66697 | |
| 2021-10-11 12:22 | p_teichmann | Note Added: 66824 | |
| 2021-10-11 17:24 | p_teichmann | Note Added: 66829 | |
| 2021-10-11 17:25 | p_teichmann | Note Edited: 66829 | |
| 2021-10-19 16:31 | galads | Status | assigned => feedback | 
| 2021-10-20 20:51 | jr_limesurvery_statconsult_de | Note Added: 66882 | |
| 2021-10-20 20:51 | jr_limesurvery_statconsult_de | Status | feedback => assigned | 
| 2021-10-20 20:54 | ollehar | Note Added: 66883 | |
| 2021-10-25 11:56 | p_teichmann | Changeset attached | => LimeSurvey master 37c9bee2 | 
| 2021-10-25 11:56 | p_teichmann | Note Added: 66922 | |
| 2021-10-25 11:56 | p_teichmann | Resolution | reopened => fixed | 
| 2021-11-10 07:34 | c_schmitz | Status | assigned => resolved | 
| 2021-11-10 07:34 | c_schmitz | Resolution | fixed => duplicate | 
| 2021-11-10 07:35 | c_schmitz | Resolution | duplicate => fixed | 
| 2021-11-10 07:42 | c_schmitz | Status | resolved => closed |