Relationship Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015463 | phpList 3 application | Interface - Backend | public | 28-04-10 05:11 | 29-04-11 11:45 |
Reporter | h2b2 | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | resolved | Resolution | fixed | ||
Product Version | 2.10.12 | ||||
Target Version | 2.10.13 | Fixed in Version | 2.10.14 | ||
Summary | 0015463: Call to iconv() doesn't fail gracefully and prevents FCKeditor from loading | ||||
Description | Several users reported that FCKeditor failed to load when opening the 'Send a Message' page. The problematic code was found in send_core.php around line 1032 and includes a call to iconv, which does not seem fail gracefully, and apparently prevents FCKeditor from loading. The issue occurred on systems that do NOT have the iconv module included in their PHP installation. A possible solution is to add a fall back method in case iconv isn't detected, though I'm not sure if using iconv in the first place is a very good idea, given that it apparently is a non-standard PHP extension. | ||||
Steps To Reproduce | System details available in this forum thread: http://forums.phplist.com/viewtopic.php?p=74819#p74819 | ||||
Additional Information | bpbeinlich found the problematic code section: ==== Start Quote ==== OK, here's the culprit: This block of code appears in send_core.php beginning at line 1032: $utf8_subject = $subject; $utf8_from = $from; if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) { $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject); $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from); } The first call to iconv crashes the page. I looked deeper and discovered that these variables ($utf8_subject and $utf_from) are not used anywhere. So this code is apparently not used at all. I commented out the entire block of 6 lines and the page now displays correctly. ==== Start Quote ==== ref: http://forums.phplist.com/viewtopic.php?p=74772#p74772 | ||||
Tags | No tags attached. | ||||
related to | 0015324 | resolved | michiel | Subject and From turn to Gibberish when saved not in English |
related to | 0015287 | resolved | michiel | v2.10.10: FCKeditor doesn't load when opening the 'send a message' page. |
related to | 0015299 | resolved | michiel | 'Short' php tag in fckphplist.php causes FCKEditor not to load |
related to | 0015215 | resolved | michiel | Saphari (on MAC) -part of user interface not displayed when creating a new message |
related to | 0011755 | resolved | michiel | FCKeditor does not appear in the message or template editor windows |
has duplicate | 0015350 | resolved | michiel | "Send Message" screen is incomplete |
has duplicate | 0015596 | resolved | michiel | Can't Send Message FCK Editor Not Loaded |
related to | 0015545 | resolved | michiel | Call to iconv() doesn't fail gracefully |
|
bpbeinlich' observation that the $utf8_subject and $utf8_from variables aren't used seems to be correct. Assuming they were to be used in the code changes suggested by lwc in issue 15324, then the changes seem to be incomplete and would probably need to look like this: $scheduling_content = '<table>'; // custom code - start $utf8_subject = $subject; $utf8_from = $from; if (strcasecmp($GLOBALS['strCharSet'], 'utf-8') <> 0) { $utf8_subject = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_subject); $utf8_from = iconv($GLOBALS['strCharSet'],'UTF-8',$utf8_from); } $maincontent .= ' <tr><td>'.Help("subject").' '.$GLOBALS['I18N']->get("Subject").':</td> <td><input type=text name="msgsubject" value="'.htmlentities($utf8_subject,ENT_QUOTES,'UTF-8').'" size=40></td></tr> <tr> <td colspan=2> </td></tr> <tr><td>'.Help("from").' '.$GLOBALS['I18N']->get("fromline").':</td> <td><input type=text name=from value="'.htmlentities($utf8_from,ENT_QUOTES,'UTF-8').'" size=40></td></tr> <tr><td colspan=2> </td></tr>'; // custom code - end See: http://mantis.phplist.com/view.php?id=15324 A fall back method would still need to be added for systems that do not have the iconv extension, if you decide keep using iconv. |
|
http://phplist.svn.sourceforge.net/phplist/?rev=2662&view=rev |