]> granicus.if.org Git - php/commitdiff
Bug Fix #27335: Numeric indexes crashing http_build_query()
authorSara Golemon <pollita@php.net>
Fri, 20 Feb 2004 20:38:14 +0000 (20:38 +0000)
committerSara Golemon <pollita@php.net>
Fri, 20 Feb 2004 20:38:14 +0000 (20:38 +0000)
ext/standard/http.c

index c5a165ef6e4323e63464438a77b8a445efd06d73..7cd909120d5bcbbe6b4ad6a829319551e77a4f8c 100644 (file)
@@ -59,9 +59,9 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
                        /* We don't want that trailing NULL */
                        key_len -= 1;
                }
-       
+
                /* handling for private & protected object properties */
-               if (*key == '\0' && type != NULL) {
+               if (key && *key == '\0' && type != NULL) {
                        char *tmp;
 
                        zend_object *zobj = zend_objects_get_address(type TSRMLS_CC);