[wp-trac] [WordPress Trac] #45482: PHP 5.2.17 Bug Workaround

WordPress Trac noreply at wordpress.org
Tue Dec 4 14:50:40 UTC 2018


#45482: PHP 5.2.17 Bug Workaround
--------------------------+------------------------------
 Reporter:  nimce         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.9.8
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Description changed by swissspidy:

Old description:

> For WordPress installations on PHP 5.2.17,
> WordPress fails to run correctly because of a PHP bug, PHP reports this
> error:
> Backend fatal error: PHP Fatal error:  Cannot use assign-op operators
> with overloaded objects nor string offsets in /wp-includes/functions.php
> on line 3346
>
> Those lines are causing the problems:
> $mce_init['plugins'] .= ',directionality';
> $mce_init['toolbar1'] .= ',ltr';
>
> Changing those lines to:
> $mce_init['plugins'] = $mce_init['plugins'] . ',directionality';
> $mce_init['toolbar1'] = $mce_init['toolbar1'] . ',ltr';
>
> Respectively, fixes the issues for this PHP version.
> It is a PHP 5.2 bug, but the workaround fixes the issue for PHP 5.2, and
> it doesn't affect newer versions of PHP, perhaps consider to change those
> 2 lines in the next release?
>
> Thanks

New description:

 For WordPress installations on PHP 5.2.17,
 WordPress fails to run correctly because of a PHP bug, PHP reports this
 error:

 {{{
 Backend fatal error: PHP Fatal error:  Cannot use assign-op operators with
 overloaded objects nor string offsets in /wp-includes/functions.php on
 line 3346
 }}}

 Those lines are causing the problems:
 {{{
 $mce_init['plugins'] .= ',directionality';
 $mce_init['toolbar1'] .= ',ltr';
 }}}

 Changing those lines to:
 {{{
 $mce_init['plugins'] = $mce_init['plugins'] . ',directionality';
 $mce_init['toolbar1'] = $mce_init['toolbar1'] . ',ltr';
 }}}

 Respectively, fixes the issues for this PHP version.
 It is a PHP 5.2 bug, but the workaround fixes the issue for PHP 5.2, and
 it doesn't affect newer versions of PHP, perhaps consider to change those
 2 lines in the next release?

 Thanks

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45482#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list