Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: Jorrit commentedFixed in CVS. The loop should be skipped when the array element can't be found.