]> granicus.if.org Git - php/commitdiff
ext/session: remove the redundant convert_to_long
authorc9s <yoanlin93@gmail.com>
Tue, 12 Mar 2019 12:21:38 +0000 (20:21 +0800)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 14 Mar 2019 16:29:10 +0000 (17:29 +0100)
ext/session/mod_user.c

index 1f03c86114d3768251cae2107ea4944c66ba840b..981e920bc1649291ea62e77af1a81e6e81fe7a25 100644 (file)
@@ -189,13 +189,14 @@ PS_GC_FUNC(user)
        ps_call_handler(&PSF(gc), 1, args, &retval);
 
        if (Z_TYPE(retval) == IS_LONG) {
-               convert_to_long(&retval);
                return Z_LVAL(retval);
        }
+
        /* This is for older API compatibility */
        if (Z_TYPE(retval) == IS_TRUE) {
                return 1;
        }
+
        /* Anything else is some kind of error */
        return -1; // Error
 }