]> granicus.if.org Git - php/commitdiff
Remove unnecessary warning by warning reorder.
authorYasuo Ohgaki <yohgaki@php.net>
Sun, 17 Jan 2016 07:21:01 +0000 (16:21 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Sun, 17 Jan 2016 08:08:44 +0000 (17:08 +0900)
ext/session/session.c

index 1de1d1edb0057aad1d376803c0584c93311b14e5..0ff8600de46e2b3bc1d0d90d946408b827fc0722 100644 (file)
@@ -2055,13 +2055,13 @@ static PHP_FUNCTION(session_regenerate_id)
                return;
        }
 
-       if (SG(headers_sent) && PS(use_cookies)) {
-               php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - headers already sent");
+       if (PS(session_status) != php_session_active) {
+               php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - session is not active");
                RETURN_FALSE;
        }
 
-       if (PS(session_status) != php_session_active) {
-               php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - session is not active");
+       if (SG(headers_sent) && PS(use_cookies)) {
+               php_error_docref(NULL, E_WARNING, "Cannot regenerate session id - headers already sent");
                RETURN_FALSE;
        }