Closed (outdated)
Project:
TinyMCE
Version:
6.x-1.1-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2008 at 01:28 UTC
Updated:
14 Jan 2021 at 19:52 UTC
Jump to comment: Most recent
Unfortunately I'm not sure what's causing this one, but when I navigate to admin/settings/tinymce/add to add my first profile I get the following error:
* warning: Invalid argument supplied for foreach() in /path/to/drupal/includes/form.inc on line 1194.
* notice: Undefined offset: 73 in /path/to/drupal/sites/all/modules/tinymce/tinymce.admin.inc on line 424.
* notice: Undefined offset: 74 in /path/to/drupal/sites/all/modules/tinymce/tinymce.admin.inc on line 425.
Comments
Comment #1
Anonymous (not verified) commentedSame here for the first warning, subscribing.
Comment #2
pishycat commentedgetting the same error, no idea why. guess i need to find a solution!
This is whats in the file, word 'foreach appears in said line 1194.
function form_type_checkboxes_value($form, $edit = FALSE) {
if ($edit === FALSE) {
$value = array();
$form += array('#default_value' => array());
foreach ($form['#default_value'] as $key) {
$value[$key] = 1;
}
return $value;
}
elseif (!isset($edit)) {
return array();
}
}
If you have any advice / a solution please let me know.
Comment #3
Tschachim1 commentedTo fix the "warning: Invalid argument supplied for foreach() in /path/to/drupal/includes/form.inc on line 1194." error, open "tinymce.admin.inc", look for the function "tinymce_profile_form_build" and there look for the line:
'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : NULL,
and replace it with
'#default_value' => isset($edit->rids) ? array_keys((array) $edit->rids) : array(),
Comment #4
dr.fox commentedthanks Tschachim1 :)
Comment #5
brei9000 commentedGood fix Tschachim1.
Comment #6
mupsi