MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001529XdebugStacktracespublic2018-02-26 21:102018-03-03 12:17
Reporterbradkent 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOSXOS Version10.11.6
Product Version2.5.5 
Target VersionFixed in Version 
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)
          empty
  1 =>
    array (size=4)
      'file' => string '/Users/bkent/Sites/xdebug_bug/index.php' (length=39)
      'line' => int 22
      'params' =>
        array (size=0)
          empty
      '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)
          empty

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
https://github.com/yiisoft/yii2/issues/8018 [^]
if only the buck didn't stop there.
TagsNo tags attached.
Operating System
PHP Version5.6.30-5.6.35
Attached Fileszip file icon __get_backtrace_bug.zip [^] (904 bytes) 2018-02-26 21:10

- Relationships

-  Notes
(0004598)
bradkent (reporter)
2018-02-26 21:49

This appears to be fixed in xdebug 2.6.0 (just tested with php 7.2)
(0004604)
derick (administrator)
2018-03-03 12:17

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: __get_backtrace_bug.zip
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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker