1
0
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:
Tim Düsterhus
2025-09-29 22:45:25 +02:00
2 changed files with 29 additions and 0 deletions

View File

@@ -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);
}

View 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
}