From: Antony Dovgal Date: Wed, 4 Oct 2006 10:52:32 +0000 (+0000) Subject: return false on invalid mode and don't segfault X-Git-Tag: RELEASE_1_0_0RC1~1433 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d85069827d3324d1512068d9d380fe5f9976110;p=php return false on invalid mode and don't segfault --- diff --git a/ext/standard/string.c b/ext/standard/string.c index fab460e265..9ad5f74e1f 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -6465,6 +6465,7 @@ PHP_FUNCTION(count_chars) } if (UG(unicode) && mode != 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only mode=1 is supported with Unicode strings"); + RETURN_FALSE; } }