]> granicus.if.org Git - php/commitdiff
reorder the branches
authorXinchen Hui <laruence@php.net>
Thu, 29 Jan 2015 04:50:56 +0000 (12:50 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 29 Jan 2015 04:50:56 +0000 (12:50 +0800)
ext/session/session.c

index 3796b68398c68a7a609a35852f7ed256d022e136..0f81945481dcc8d77d4dba04584f51fdf99ff4a1 100644 (file)
@@ -1439,12 +1439,12 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name) /* {{{ */
 /* }}} */
 
 static void ppid2sid(zval *ppid) {
-       if (Z_TYPE_P(ppid) != IS_STRING) {
-               PS(id) = NULL;
-               PS(send_cookie) = 1;
-       } else {
+       if (Z_TYPE_P(ppid) == IS_STRING) {
                PS(id) = zend_string_init(Z_STRVAL_P(ppid), Z_STRLEN_P(ppid), 0);
                PS(send_cookie) = 0;
+       } else {
+               PS(id) = NULL;
+               PS(send_cookie) = 1;
        }
 }