View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 05682 | Bug reports | Survey participants (Tokens) | public | 2012-01-21 15:45 | 2012-03-11 16:35 |
| Reporter | Assigned To | ||||
| Priority | normal | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 2.00a1 | ||||
| Fixed in Version | 2.00a2 | ||||
| Summary | 05682: 500 attempting to export tokens | ||||
| Description | Trying to export tokens from the token manager causes a 500 error when no tokens exist. Invalid argument supplied for foreach() | ||||
| Tags | No tags attached. | ||||
| Attached Files | textfile1.patch (755 bytes)
Index: application/views/admin/token/exportdialog.php
===================================================================
--- application/views/admin/token/exportdialog.php (revision 12308)
+++ application/views/admin/token/exportdialog.php (working copy)
@@ -23,10 +23,12 @@
</select></li>
<li><label for='tokenlanguage' ><?php $clang->eT('Filter by language'); ?></label><select id='tokenlanguage' name='tokenlanguage' >
<option selected='selected' value=''><?php $clang->eT('All'); ?></option>
-<?php
+<?php
+if($resultr){
foreach ($resultr as $lrow)
{
echo "<option value='{$lrow['language']}'>" . getLanguageNameFromCode($lrow['language']) . "</option>";
+}
}
?>
</select></li>
| ||||
| Bug heat | 2 | ||||
| Complete LimeSurvey version number (& build) | 12135 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | |||||
| Database type & version | MySQL 5.1.58 | ||||
| Server OS (if known) | Ubuntu Linux | ||||
| Webserver software & version (if known) | Apache 2.2.20 | ||||
| PHP Version | PHP 5.3.6-13 | ||||
| Git branch / Pull Request URL | |||||
|
Although this patch fixes the 500, the resulting file is not a valid csv file. This needs resolved. Instead, it should output a csv file with a single header row when there are no tokens. |
|
|
Fixed additional issue where CSV files from token export were wrapped in HTML. |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2012-01-21 15:45 |
|
New Issue | |
| 2012-01-21 15:45 |
|
Status | new => assigned |
| 2012-01-21 15:45 |
|
Assigned To | => ShellZero |
| 2012-02-02 18:25 | ShellZero | File Added: textfile1.patch | |
| 2012-02-02 18:31 | ShellZero | File Deleted: textfile1.patch | |
| 2012-02-02 19:19 | ShellZero | File Added: textfile1.patch | |
| 2012-02-05 11:11 |
|
Note Added: 17228 | |
| 2012-02-10 07:31 |
|
Assigned To | ShellZero => user16774 |
| 2012-02-10 07:52 |
|
Note Added: 17350 | |
| 2012-02-10 07:52 |
|
Status | assigned => resolved |
| 2012-02-10 07:52 |
|
Fixed in Version | => 2.00a1 |
| 2012-02-10 07:52 |
|
Resolution | open => fixed |
| 2012-03-11 16:35 | c_schmitz | Status | resolved => closed |
| 2012-03-11 16:35 | c_schmitz | Fixed in Version | 2.00a1 => 2.00a2 |
| 2016-12-08 10:39 | c_schmitz | Category | Tokens => Survey participants (Tokens) |