WordPress.org

Ready to get started?Download WordPress

Forums

bug in wp-settings.php (4 posts)

  1. mosherabenu
    Member
    Posted 7 years ago #

    Yesterday was everything ok with my weblog, but today I entered on it and there is the messages:

    Strict Standards: Assigning the return value of new by reference is deprecated in /opt/apache/htdocs/moshe/www/wp-settings.php on line 232

    Strict Standards: Assigning the return value of new by reference is deprecated in /opt/apache/htdocs/moshe/www/wp-settings.php on line 234

    Strict Standards: Assigning the return value of new by reference is deprecated in /opt/apache/htdocs/moshe/www/wp-settings.php on line 235

    Strict Standards: Assigning the return value of new by reference is deprecated in /opt/apache/htdocs/moshe/www/wp-settings.php on line 252

    And it repeats also in the configurations after logged in :/
    What can be happening?
    How do I solve that?

    You can see it: http://www.moshe.blog.br
    thanks!!!

  2. Class
    Member
    Posted 7 years ago #

    It looks like warnings (not errors) from the webserver.
    Maybe contact support where you have your site hosted and ask them if they changed something?

  3. carsong
    Member
    Posted 7 years ago #

    Maybe contact support where you have your site hosted and ask them if they changed something?

    They may have changed the php.ini file to report coding standards errors found in source code. Or specifically they probably changed the default php installation's php.ini file to:

    error_reporting = E_All
    display_errors = On

    The Strict Standards: Assigning the return value of new by reference is deprecated is a coding standards violation in WordPress (meaning this is a defect in WordPress).

    Deprecated means that the syntax used is eventually being phased out for something better.

    Maybe a WordPress developer can look at the standards violation.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    This is not a standards violation, it's a difference between versions of PHP.

    Strict Standards: Assigning the return value of new by reference is deprecated...

    What's going on here has to do with lines like these:
    $variable = & new SomeObject();

    In PHP4, the ampersand is necessary to get the variable and not a copy of it.
    In PHP5, this behavior is the default and the ampersand is not needed, thus generating that error message when Strict mode is enabled.

    Since WordPress is designed to work on PHP4 *and* PHP5, that ampersand is necessary to make it work on PHP4.

    Therefore, you need to disable strict mode. Or, at least, disable reporting of E_STRICT.

Topic Closed

This topic has been closed to new replies.

About this Topic