View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
05282 | Bug reports | Survey taking | public | 2011-06-17 22:05 | 2011-06-21 14:31 |
Reporter | TMSWhite | Assigned To | TMSWhite | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.91+ | ||||
Summary | 05282: save.php error when trying to save a fileUpload field, but not file was uploaded | ||||
Description | LimeSurvey throws a save.php error, saying unknown object, if tries to save a survey when no file has been uploaded | ||||
Steps To Reproduce | Patch to fix the problem is attached | ||||
Tags | No tags attached. | ||||
Attached Files | save-fileupload-patch.patch (919 bytes)
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\xampp\htdocs\limesurvey # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: save.php --- save.php Base (BASE) +++ save.php Locally Modified (Based On LOCAL) @@ -500,7 +500,7 @@ // if the files have not been saved already, // move the files from tmp to the files folder - if (file_exists("tmp/upload/".$phparray[0]->filename)) + if (!is_null($phparray) && file_exists("tmp/upload/".$phparray[0]->filename)) { // move files from temp to files directory $tmp = "tmp/upload/"; save-fileupload-v2.patch (943 bytes)
# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\xampp\htdocs\limesurvey # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: save.php --- save.php Base (BASE) +++ save.php Locally Modified (Based On LOCAL) @@ -500,7 +500,7 @@ // if the files have not been saved already, // move the files from tmp to the files folder - if (file_exists("tmp/upload/".$phparray[0]->filename)) + if (!is_null($phparray) && count($phparray) > 0 && file_exists("tmp/upload/".$phparray[0]->filename)) { // move files from temp to files directory $tmp = "tmp/upload/"; | ||||
Bug heat | 4 | ||||
Complete LimeSurvey version number (& build) | 10280 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | |||||
Database type & version | Mysql | ||||
Server OS (if known) | Windows XP | ||||
Webserver software & version (if known) | Apache 2 | ||||
PHP Version | 5 | ||||
Use the save-fileupload-v2.patch instead - needed to catch one additional condition to prevent the save.php error |
|
TMSWhite: looks great, please apply to /limesurvey stable branch. |
|
OK, committed. Do you want me to commit the other bug fixes that were assigned to me? |
|
yes, please |
|
New version released. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-17 22:05 | TMSWhite | New Issue | |
2011-06-17 22:05 | TMSWhite | File Added: save-fileupload-patch.patch | |
2011-06-17 23:12 | TMSWhite | File Added: save-fileupload-v2.patch | |
2011-06-17 23:12 | TMSWhite | Note Added: 15482 | |
2011-06-18 13:31 | c_schmitz | Note Added: 15491 | |
2011-06-18 13:32 | c_schmitz | Assigned To | => TMSWhite |
2011-06-18 13:32 | c_schmitz | Status | new => assigned |
2011-06-18 14:32 | TMSWhite | Note Added: 15493 | |
2011-06-18 14:35 | TMSWhite | Status | assigned => resolved |
2011-06-18 14:35 | TMSWhite | Resolution | open => fixed |
2011-06-18 17:12 | c_schmitz | Note Added: 15494 | |
2011-06-21 14:31 | c_schmitz | Note Added: 15542 | |
2011-06-21 14:31 | c_schmitz | Status | resolved => closed |