fix crahs with empty urls because of typo
authorMichael Wallner <mike@php.net>
Wed, 29 Feb 2012 08:26:11 +0000 (08:26 +0000)
committerMichael Wallner <mike@php.net>
Wed, 29 Feb 2012 08:26:11 +0000 (08:26 +0000)
php_http_url.c

index b9ea708ce3512477ef3aacd59bf833eaf46bb8ef..40ed57ec8c9fb43fe92ac6fb5c3fd7c578f0a49f 100644 (file)
@@ -495,7 +495,7 @@ PHP_METHOD(HttpUrl, __construct)
                                                default: {
                                                        zval *cpy = php_http_ztyp(IS_STRING, new_url);
 
-                                                       new_purl = php_url_parse(Z_STRVAL_P(new_url));
+                                                       new_purl = php_url_parse(Z_STRVAL_P(cpy));
                                                        zval_ptr_dtor(&cpy);
                                                        break;
                                                }
@@ -513,7 +513,7 @@ PHP_METHOD(HttpUrl, __construct)
                                                default: {
                                                        zval *cpy = php_http_ztyp(IS_STRING, old_url);
 
-                                                       old_purl = php_url_parse(Z_STRVAL_P(old_url));
+                                                       old_purl = php_url_parse(Z_STRVAL_P(cpy));
                                                        zval_ptr_dtor(&cpy);
                                                        break;
                                                }