View Issue Details

IDProjectCategoryView StatusLast Update
0001529XdebugStacktracespublic2018-03-03 12:17
Reporterbradkent Assigned Toderick  
Status resolvedResolutionno change required 
OSOSXOS Version10.11.6 
Product Version2.5.5 
Summary0001529: xdebug_get_function_stack() wrong file, in frame calling __get() magic method
DescriptionThe wrong calling file is listed in a xdebug_get_function_stack() trace
file from previous frame appears to be listed
The correct line is shown
Steps To Reproducecall xdebug_get_function_stack() from within __get() magic method

attached file contains
index.php simply includes include.php
include.php calls ClassA::getInstance()-bogusProperty
ClassA __get method calls xdebug_get_function_stack()

produces this backtrace:

array (size=3)
  0 =>
    array (size=4)
      'function' => string '{main}' (length=6)
      'file' => string '/Users/bkent/Sites/xdebug_bug/index.php' (length=39)
      'line' => int 0
      'params' =>
        array (size=0)
  1 =>
    array (size=4)
      'file' => string '/Users/bkent/Sites/xdebug_bug/index.php' (length=39)
      'line' => int 22
      'params' =>
        array (size=0)
      'include_filename' => string '/Users/bkent/Sites/xdebug_bug/include.php' (length=41)
  2 =>
    array (size=6)
      'function' => string '__get' (length=5)
      'type' => string 'dynamic' (length=7)
      'class' => string 'ClassA' (length=6)
      'file' => string '/Users/bkent/Sites/xdebug_bug/index.php' (length=39)
      'line' => int 3
      'params' =>
        array (size=0)

The last frame has the correct line number, but the wrong file
the correct file is seen in stack[1]['include_filename']
Additional Informationwhen googling this issue I found
if only the buck didn't stop there.
TagsNo tags attached.
Operating System
PHP Version5.6.30-5.6.35



2018-02-26 21:10



2018-02-26 21:49

reporter   ~0004598

This appears to be fixed in xdebug 2.6.0 (just tested with php 7.2)


2018-03-03 12:17

administrator   ~0004604

As this is already fixed in Xdebug 2.6, there is nothing to do for me here. Thanks for reporting, and verification.

Issue History

Date Modified Username Field Change
2018-02-26 21:10 bradkent New Issue
2018-02-26 21:10 bradkent File Added:
2018-02-26 21:49 bradkent Note Added: 0004598
2018-03-03 12:17 derick Note Added: 0004604
2018-03-03 12:17 derick Status new => resolved
2018-03-03 12:17 derick Resolution open => no change required
2018-03-03 12:17 derick Assigned To => derick