Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
6.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
20 Apr 2010 at 00:58 UTC
Updated:
22 Jun 2010 at 13:30 UTC
Hi there,
To properly develop in Drupal, you should turn on the E_NOTICE on your development machine (See #761780: Plenty of E_ALL notices in modules developed on installation with Drupal tarball.)
I got a notice today and am attaching a patch.
The definition and use of $js_id in the array_merge() looks okay. But I'm wondering... Because later you re-use $js_id many times when it may be NULL. Isn't that part possibly invalid?
//loop through all enabled filters
foreach ($enabled as $id => $filter) {
//but use only that one selected in FCKeditor profile
if (in_array($id, array_keys($_fckeditor_configuration[$textarea_id]['filters'])) && $_fckeditor_configuration[$textarea_id]['filters'][$id]) {
if (!isset($fckeditor_filters[$js_id])) {
$fckeditor_filters[$js_id] = array();
}
$fckeditor_filters[$js_id][] = $id ."/". $format;
}
}
Thank you.
Alexis Wilke
| Comment | File | Size | Author |
|---|---|---|---|
| fckeditor-e_notice-6.x.patch | 593 bytes | AlexisWilke |
Comments
Comment #1
Jorrit commentedFixed in CVS. The loop should be skipped when the array element can't be found.