php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #68175
Patch RegexIterator_getPregFlags_zero revision 2014-10-07 11:03 UTC by tim_siebels_aurich at yahoo dot de

Patch RegexIterator_getPregFlags_zero for SPL related Bug #68175

Patch version 2014-10-07 11:03 UTC

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

Developer: tim_siebels_aurich@yahoo.de

From 8fc2151ce87d6685e7f89207c3f5c7ceca612d2a Mon Sep 17 00:00:00 2001
From: Tim Siebels <tim_siebels_aurich@yahoo.de>
Date: Tue, 7 Oct 2014 13:02:12 +0200
Subject: [PATCH] RegexIterator getPregFlags return 0 instead of NULL on
 default value

---
 ext/spl/spl_iterators.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index dddc8c5..bc93da8 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -2221,7 +2221,7 @@ SPL_METHOD(RegexIterator, getPregFlags)
 	if (intern->u.regex.use_flags) {
 		RETURN_LONG(intern->u.regex.preg_flags);
 	} else {
-		return;
+		RETURN_LONG(0);
 	}
 } /* }}} */
 
-- 
1.9.1

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 12:01:25 2020 UTC