Merge branch 'PHP-8.1' into PHP-8.2

This commit is contained in:
David Carlier 2023-02-25 14:33:11 +00:00
commit bf68d10bb4
2 changed files with 4 additions and 0 deletions

2
NEWS
View file

@ -17,6 +17,8 @@ PHP NEWS
misleadingly with the wrong return type. (nielsdos)
. Fix bug GH-10570 (Fixed unknown string hash on property fetch with integer
constant name). (nielsdos)
. Fixed php_fopen_primary_script() call resulted on zend_destroy_file_handle()
freeing dangling pointers on the handle as it was uninitialized. (nielsdos)
- Curl:
. Fixed deprecation warning at compile time. (Max Kellermann)

View file

@ -353,6 +353,8 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle)
size_t length;
bool orig_display_errors;
memset(file_handle, 0, sizeof(zend_file_handle));
path_info = SG(request_info).request_uri;
#if HAVE_PWD_H
if (PG(user_dir) && *PG(user_dir) && path_info && '/' == path_info[0] && '~' == path_info[1]) {