[wp-trac] [WordPress Trac] #35693: PHP Warning: implode(): Invalid arguments passed in wp-includes/class-wp-editor.php on line 683
WordPress Trac
noreply at wordpress.org
Tue Feb 2 16:52:27 UTC 2016
#35693: PHP Warning: implode(): Invalid arguments passed in wp-includes/class-wp-
editor.php on line 683
--------------------------+-----------------------------
Reporter: aohipa | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.4.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Everytime we use a WYSIWYG editor we get this PHP warning.
NULL values are beeing used to fill the toolbar1/2/3/4 attributes in
$mceInit.
And souldn't it be implode(',', $mce_buttons) and so on? Seems like $glue
and $pieses are mixed up...
proposal:
{{{#!php
<?php
$mceInit = array (
'selector' => "#$editor_id",
'resize' => 'vertical',
'menubar' => false,
'wpautop' => (bool) $set['wpautop'],
'indent' => ! $set['wpautop'],
'toolbar1' => ($mce_buttons)? implode(',', $mce_buttons) :
NULL,
'toolbar2' => ($mce_buttons_2)? implode(',', $mce_buttons_2) :
NULL,
'toolbar3' => ($mce_buttons_3)? implode(',', $mce_buttons_3) :
NULL,
'toolbar4' => ($mce_buttons_4)? implode(',', $mce_buttons_4) :
NULL,
'tabfocus_elements' => $set['tabfocus_elements'],
'body_class' => $body_class
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35693>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list