Support » Fixing WordPress » WP 4.6.1 got error with PHP 7.1

  • Hello,
    I tried installing WP 4.6.1 in with php 7.1.0 the site ran okay, but it shows 2 warning messages on the top of the font page and 3 messages in admin page

    In the font page are: (2 messages)

    Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in my_web_root\wordpress\wp-includes\plugin.php on line 600

    Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in my_web_root\wordpress\wp-includes\plugin.php on line 600

    The code line in file like
    call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));

    In the admin site are (3 messages)

    Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in my_web_root\wordpress\wp-includes\plugin.php on line 600

    Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in my_web_root\wordpress\wp-includes\plugin.php on line 600

    Warning: Cannot assign an empty string to a string offset in my_web_root\wordpress\wp-includes\class.wp-scripts.php on line 447

    The code line of first two messages as the same above
    The code line for class.wp-script.php is

    $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');

    Any ideas or suggestions how to fix them it would be appreciated

    Thank you,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    1. These are warnings, not fatal errors. In your wp-config.php, change the define of WP_DEBUG from true to false.

    2. This is probably best reported on https://core.trac.wordpress.org/ to bring it to the attention of the core devs.

    Thank you for quick reply, but the define (‘WP_DEBUG’, false); it already set false

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    You may have a php.ini that’s overriding error displays. You do understand that PHP 7.1 is not officially released?

    I attempt my webserver with php 7.1 dev and the last version of mariadb (prepare for my client demand)
    for general, we can download and install PHP 7.1.0 RC2
    http://windows.php.net/qa/

    pay attention the suggestion on the left panel for good one

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    So I can confirm that I see the same thing now that I’ve upgraded from 7.0 to 7.1. I upgrade WP from 4.6 to 4.7 RC2 and the notice went away.

    • This reply was modified 2 years, 11 months ago by Steve Stern.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 4.6.1 got error with PHP 7.1’ is closed to new replies.