mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.5'
* PHP-8.5: NEWS: Fix section order lexbor: Cherry pick "Core: Reset length in lexbor_str_destroy()"
This commit is contained in:
@@ -80,6 +80,7 @@ lexbor_str_destroy(lexbor_str_t *str, lexbor_mraw_t *mraw, bool destroy_obj)
|
||||
}
|
||||
|
||||
if (str->data != NULL) {
|
||||
lexbor_str_clean(str);
|
||||
str->data = lexbor_mraw_free(mraw, str->data);
|
||||
}
|
||||
|
||||
|
||||
28
ext/uri/tests/gh19979.phpt
Normal file
28
ext/uri/tests/gh19979.phpt
Normal file
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
GH-19979: Zend/zend_string.h:191:24: runtime error: null pointer passed as argument 2, which is declared to never be null
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$baseUrl = \Uri\WhatWg\Url::parse('https://example.com/path?query');
|
||||
var_dump(\Uri\WhatWg\Url::parse('relative', $baseUrl));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(Uri\WhatWg\Url)#%d (8) {
|
||||
["scheme"]=>
|
||||
string(5) "https"
|
||||
["username"]=>
|
||||
NULL
|
||||
["password"]=>
|
||||
NULL
|
||||
["host"]=>
|
||||
string(11) "example.com"
|
||||
["port"]=>
|
||||
NULL
|
||||
["path"]=>
|
||||
string(9) "/relative"
|
||||
["query"]=>
|
||||
NULL
|
||||
["fragment"]=>
|
||||
NULL
|
||||
}
|
||||
Reference in New Issue
Block a user