From: krakjoe Date: Thu, 14 Nov 2013 13:04:59 +0000 (+0000) Subject: additional checks in is_* X-Git-Tag: php-5.6.0alpha1~110^2~339 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e597eba07fac8600adb9ab5be19906dfb5f0a82;p=php additional checks in is_* --- diff --git a/phpdbg_utils.c b/phpdbg_utils.c index c61d38fa88..95a49e3e54 100644 --- a/phpdbg_utils.c +++ b/phpdbg_utils.c @@ -30,6 +30,9 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg); int phpdbg_is_numeric(const char *str) /* {{{ */ { + if (!str) + return 0; + for (; *str; str++) { if (isspace(*str)) { continue; @@ -41,6 +44,9 @@ int phpdbg_is_numeric(const char *str) /* {{{ */ int phpdbg_is_empty(const char *str) /* {{{ */ { + if (!str) + return 1; + for (; *str; str++) { if (isspace(*str)) { continue;