[wp-trac] [WordPress Trac] #37071: PHP 7.1.0 changed how they handle string vs array-indexes.
WordPress Trac
noreply at wordpress.org
Fri Jun 10 10:42:07 UTC 2016
#37071: PHP 7.1.0 changed how they handle string vs array-indexes.
--------------------------+-----------------------------
Reporter: simonvik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Login to wordpress fails with Warning: Illegal string offset 'user_login'
under php 7.1.0 alpha 1.
wp-login.php sends an empty string to wp_signon that expects an array.
The following patch to wp-login.php seems to solves the issue:
{{{#!php
@@ -790,7 +790,7 @@ function retrieve_password() {
$reauth = empty($_REQUEST['reauth']) ? false : true;
- $user = wp_signon( '', $secure_cookie );
+ $user = wp_signon( array(), $secure_cookie );
if ( empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
if ( headers_sent() ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37071>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list