php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #78624
Patch 151203849618 revision 2019-10-02 23:25 UTC by bshafs at gmail dot com

Patch 151203849618 for Session related Bug #78624

Patch version 2019-10-02 23:25 UTC

Return to Bug #78624 | Download this patch
Patch Revisions:

Developer: bshafs@gmail.com

diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c
index 9ab0be13cd..897955166b 100644
--- a/ext/session/mod_user.c
+++ b/ext/session/mod_user.c
@@ -192,14 +192,15 @@ PS_GC_FUNC(user)
 
 	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;
+		*nrdels = Z_LVAL(retval);
+	} else if (Z_TYPE(retval) == IS_TRUE) {
+		/* This is for older API compatibility */
+		*nrdels = 1;
+	} else {
+		/* Anything else is some kind of error */
+		*nrdels = -1; // Error
 	}
-	/* Anything else is some kind of error */
-	return -1; // Error
+	return *nrdels;
 }
 
 PS_CREATE_SID_FUNC(user)
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 16:01:25 2020 UTC