From: Xinchen Hui Date: Thu, 29 Jan 2015 04:50:56 +0000 (+0800) Subject: reorder the branches X-Git-Tag: PRE_PHP7_REMOVALS~21^2~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d96eb4b0a8bbc69d6be4fcaf31d02d718f21a617;p=php reorder the branches --- diff --git a/ext/session/session.c b/ext/session/session.c index 3796b68398..0f81945481 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -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; } }