php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #80364
Patch user_filters.patch revision 2020-11-13 17:27 UTC by sagpant at microsoft dot com

Patch user_filters.patch for *General Issues Bug #80364

Patch version 2020-11-13 17:27 UTC

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

Developer: sagpant@microsoft.com

diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index a48e0d3509..c53a911ea3 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -137,11 +137,13 @@ static void userfilter_dtor(php_stream_filter *thisfilter)
 
 	ZVAL_STRINGL(&func_name, "onclose", sizeof("onclose")-1);
 
-	call_user_function(NULL,
-			obj,
-			&func_name,
-			&retval,
-			0, NULL);
+	if (FAILURE == call_user_function(NULL,
+		obj,
+		&func_name,
+		&retval,
+		0, NULL)) {
+		ZEND_ASSERT(Z_TYPE(retval) == IS_UNDEF);
+	}
 
 	zval_ptr_dtor(&retval);
 	zval_ptr_dtor(&func_name);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC