mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Handle reference zvals when outputting superglobals in phpinfo() Signed-off-by: Christoph M. Becker <cmbecker69@gmx.de>
This commit is contained in:
commit
443478109b
4
NEWS
4
NEWS
@ -33,6 +33,10 @@ PHP NEWS
|
|||||||
. Fixed bug #69668 (SOAP special XML characters in namespace URIs not
|
. Fixed bug #69668 (SOAP special XML characters in namespace URIs not
|
||||||
encoded). (cmb)
|
encoded). (cmb)
|
||||||
|
|
||||||
|
- Standard:
|
||||||
|
. Fixed bug #80915 (Taking a reference to $_SERVER hides its values from
|
||||||
|
phpinfo()). (Rowan Tommins)
|
||||||
|
|
||||||
01 Apr 2021, PHP 8.0.4
|
01 Apr 2021, PHP 8.0.4
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
|
@ -173,7 +173,7 @@ static ZEND_COLD void php_print_gpcse_array(char *name, uint32_t name_length)
|
|||||||
key = zend_string_init(name, name_length, 0);
|
key = zend_string_init(name, name_length, 0);
|
||||||
zend_is_auto_global(key);
|
zend_is_auto_global(key);
|
||||||
|
|
||||||
if ((data = zend_hash_find(&EG(symbol_table), key)) != NULL && (Z_TYPE_P(data) == IS_ARRAY)) {
|
if ((data = zend_hash_find_deref(&EG(symbol_table), key)) != NULL && (Z_TYPE_P(data) == IS_ARRAY)) {
|
||||||
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(data), num_key, string_key, tmp) {
|
ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(data), num_key, string_key, tmp) {
|
||||||
if (!sapi_module.phpinfo_as_text) {
|
if (!sapi_module.phpinfo_as_text) {
|
||||||
php_info_print("<tr>");
|
php_info_print("<tr>");
|
||||||
|
20
ext/standard/tests/bug80915.phpt
Normal file
20
ext/standard/tests/bug80915.phpt
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--TEST--
|
||||||
|
Bug #80915: Taking a reference to $_SERVER hides its values from phpinfo()
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$_ENV = [];
|
||||||
|
$_SERVER = [ 'test' => 'test' ];
|
||||||
|
|
||||||
|
$reference =& $_SERVER;
|
||||||
|
|
||||||
|
phpinfo(INFO_VARIABLES);
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
phpinfo()
|
||||||
|
|
||||||
|
PHP Variables
|
||||||
|
|
||||||
|
Variable => Value
|
||||||
|
$_SERVER['test'] => test
|
Loading…
Reference in New Issue
Block a user