View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
06578 | Bug reports | Installation | public | 2012-09-21 18:17 | 2012-09-28 15:44 |
Reporter | Assigned To | c_schmitz | |||
Priority | high | Severity | partial_block | ||
Status | closed | Resolution | fixed | ||
Product Version | 2.00+ | ||||
Fixed in Version | 2.00+ | ||||
Summary | 06578: Saving settings | ||||
Description | This is a re-reporting of issue 6394 CDbException CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'stg_value' cannot be null. The SQL statement executed was: UPDATE C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\limesurvey\framework\db\CDbCommand.php(354))I can confirm this is an issue with the latest version of LimeSurvey (downloaded this afternoon using the links on the download page). It's a clean fresh install, MySQL 5.1, Apache 2.2, PHP 5.2.10 running on Windows XP. This issue appears to be caused by a problem with the 'returnGlobal' function in application\helpers\common_helper.php. returnGlobal uses the 'empty' function to decide whether it needs to retrieve the value from say $_POST and use it to populate $urlParam. Unfortunately, the field that caused me headaches with this (emailsmtpdebug) uses the value '0' for Off. Clearly from the documents at php.net, the empty function considers '0' to be empty and thus returns TRUE meaning that (!empty($_POST[$stringname])) evaluates to false and the value is not returned. As a consequence, a NULL value is passed into setGlobalSetting which results in the SQL failing because stg_value gets a NULL (hence the constraint violation error). I've only literally just downloaded LimeSurvey and I've not got enough time at the moment to investigate and put forward a fix, but a change from using empty is probably required. As I say, if I had more time I would investigate the knock on effects of making such a change and possibly submit a patch. It really needs a dev who knows plenty more about the project as a whole to make an assessment as I suspect 'returnGlobal' is used quite a lot. | ||||
Tags | No tags attached. | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 120920 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | MySQL 5.1 | ||||
Server OS (if known) | Windows XP SP3 | ||||
Webserver software & version (if known) | Apache 2.2 | ||||
PHP Version | 5.2.10 | ||||
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9532 |
|
2.00+ 120924 released. Please update manually as ComfortUpdate is not working yet. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=9575 |
|
LimeSurvey: master 23b925be 2012-09-24 04:03 Details Diff |
Fixed issue 06578: Error whan saving global settings |
Affected Issues 06578 |
|
mod - application/controllers/admin/globalsettings.php | Diff File | ||
mod - application/views/admin/globalSettings_view.php | Diff File | ||
LimeSurvey: master 8403e06a 2012-09-28 08:44 Details Diff |
Fixed issue 06578: Error whan saving global settings |
Affected Issues 06578 |
|
mod - application/controllers/admin/globalsettings.php | Diff File | ||
mod - application/helpers/common_helper.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-09-21 18:17 |
|
New Issue | |
2012-09-21 18:18 |
|
Issue Monitored: user21877 | |
2012-09-24 11:03 | c_schmitz | Assigned To | => c_schmitz |
2012-09-24 11:03 | c_schmitz | Status | new => assigned |
2012-09-24 11:03 | c_schmitz | Changeset attached | => LimeSurvey master 23b925be |
2012-09-24 11:03 | c_schmitz | Note Added: 20771 | |
2012-09-24 11:03 | c_schmitz | Resolution | open => fixed |
2012-09-24 11:03 | c_schmitz | Status | assigned => resolved |
2012-09-24 11:03 | c_schmitz | Fixed in Version | => 2.00+ |
2012-09-24 11:04 | c_schmitz | Relationship added | has duplicate 06583 |
2012-09-24 14:07 | c_schmitz | Note Added: 20776 | |
2012-09-24 14:07 | c_schmitz | Status | resolved => closed |
2012-09-28 15:42 | c_schmitz | Relationship added | related to 06600 |
2012-09-28 15:44 | c_schmitz | Changeset attached | => LimeSurvey master 8403e06a |
2012-09-28 15:44 | c_schmitz | Note Added: 20880 |