Skip to content

Commit 1bd9890

Browse files
committed
Fix GH-8310: Registry settings are no longer recognized
`zend_file_handle->filename` is a `zend_string*` pointer now, so we must not cast to `char*` but rather pass the underlying `char*`. Closes GH-8313.
1 parent 187f5a3 commit 1bd9890

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.1.6
44

5+
- Core:
6+
. Fixed bug GH-8310 (Registry settings are no longer recognized). (cmb)
7+
58
- Date:
69
. Fixed bug GH-7752 (DateTimeZone::getTransitions() returns insufficient
710
data). (Derick)

main/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,7 +2489,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file)
24892489

24902490
#ifdef PHP_WIN32
24912491
if(primary_file->filename) {
2492-
UpdateIniFromRegistry((char*)primary_file->filename);
2492+
UpdateIniFromRegistry(ZSTR_VAL(primary_file->filename));
24932493
}
24942494
#endif
24952495

@@ -2581,7 +2581,7 @@ PHPAPI int php_execute_simple_script(zend_file_handle *primary_file, zval *ret)
25812581
zend_try {
25822582
#ifdef PHP_WIN32
25832583
if(primary_file->filename) {
2584-
UpdateIniFromRegistry((char*)primary_file->filename);
2584+
UpdateIniFromRegistry(ZSTR_VAL(primary_file->filename));
25852585
}
25862586
#endif
25872587

0 commit comments

Comments
 (0)