]> granicus.if.org Git - php/commitdiff
additional checks in is_*
authorkrakjoe <joe.watkins@live.co.uk>
Thu, 14 Nov 2013 13:04:59 +0000 (13:04 +0000)
committerkrakjoe <joe.watkins@live.co.uk>
Thu, 14 Nov 2013 13:04:59 +0000 (13:04 +0000)
phpdbg_utils.c

index c61d38fa88f44bd4bc44379f724ee714d0ff0d7d..95a49e3e54651bbe8e233d6c1be07493aaa8deff 100644 (file)
@@ -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;