Skip to content

Commit

Permalink
Merged pull request #260
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Feb 8, 2016
2 parents acd240a + d7901ef commit a0ef476
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/bug01266.phpt
@@ -0,0 +1,14 @@
--TEST--
Test for bug #1266: xdebug_dump_superglobals() always dumps empty $_SESSION stack on PHP 7
--INI--
xdebug.dump.SESSION=*
--FILE--
<?php
session_start();
$_SESSION['foo'] = 'bar';

xdebug_dump_superglobals();
?>
--EXPECT--
Dump $_SESSION
$_SESSION['foo'] = 'bar'
3 changes: 3 additions & 0 deletions xdebug_superglobals.c
Expand Up @@ -118,6 +118,9 @@ static void dump_hash(xdebug_llist *l, char *name, int name_len, int html, xdebu
{
zend_string *s_name = zend_string_init(name, name_len, 0);
if ((z = zend_hash_find(&EG(symbol_table), s_name))) {
if (Z_TYPE_P(z) == IS_REFERENCE) {
z = &z->value.ref->val;
}
if (Z_TYPE_P(z) == IS_ARRAY) {
ht = Z_ARRVAL_P(z);
}
Expand Down

0 comments on commit a0ef476

Please sign in to comment.