Please, look into the screenshot.
In the second entry you see the highlighted line is an empty one. That is because the wrong code was displayed. It is line 131 of another class (not CiController) that has caused the error (caused by $x = $this->material). The third entry is then okay again. Only the second entry shows the wrong source.
Using Yii 2.0.3.

Can't do anything about it w/o the code to reproduce it.
I tried to find it out by myself. I didn't know what to post here.
Okay, what I found out so far is that this wrong entry is caused by function xdebug_get_function_stack() in constructor of class yii\base\ErrorException. Here is the array that I've got for this exception. The wrong file is already in that array:
[
'function' => '{main}',
'file' => '/var/www/html/misc/c3integration/web/index.php',
'line' => 0,
'params' => [],
],
[
'function' => 'run',
'type' => 'dynamic',
'class' => 'yii\\base\\Application',
'file' => '/var/www/html/misc/c3integration/web/index.php',
'line' => 7,
'params' => [],
],
[
'function' => 'handleRequest',
'type' => 'dynamic',
'class' => 'yii\\web\\Application',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/Application.php',
'line' => 375,
'params' => [],
],
[
'function' => 'runAction',
'type' => 'dynamic',
'class' => 'yii\\base\\Module',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/web/Application.php',
'line' => 83,
'params' => [],
],
[
'function' => 'runAction',
'type' => 'dynamic',
'class' => 'yii\\base\\Controller',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/Module.php',
'line' => 455,
'params' => [],
],
[
'function' => 'runWithParams',
'type' => 'dynamic',
'class' => 'yii\\base\\InlineAction',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/Controller.php',
'line' => 151,
'params' => [],
],
[
'function' => 'call_user_func_array:{/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/InlineAction.php:55}',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/InlineAction.php',
'line' => 55,
'params' => [],
],
[
'function' => 'actionResult',
'type' => 'dynamic',
'class' => 'app\\controllers\\CiController',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/InlineAction.php',
'line' => 55,
'params' => [],
],
[
'function' => 'storePlateDataIntoDB',
'type' => 'dynamic',
'class' => 'app\\models\\CiResumeSession',
'file' => '/var/www/html/misc/c3integration/controllers/CiController.php',
'line' => 206,
'params' => [],
],
[
'function' => '__get',
'type' => 'dynamic',
'class' => 'yii\\base\\Component',
'file' => '/var/www/html/misc/c3integration/controllers/CiController.php',
'line' => 131,
'params' => [],
],
[
'function' => 'getMaterial',
'type' => 'dynamic',
'class' => 'app\\models\\CiSession',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/Component.php',
'line' => 130,
'params' => [],
],
[
'function' => 'handleError',
'type' => 'dynamic',
'class' => 'yii\\base\\ErrorHandler',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/Component.php',
'line' => 158,
'params' => [],
],
[
'function' => '__construct',
'type' => 'dynamic',
'class' => 'yii\\base\\ErrorException',
'file' => '/var/www/html/misc/c3integration/vendor/yiisoft/yii2/base/ErrorHandler.php',
'line' => 140,
'params' => [],
],
Error occured on Fedora 20 with Xdebug 2.2.7, PHP 5.5.23, Apache 2.4.10 (and Phusion_Passenger 4.0.42 if this has anything to do with it).
So it is not Yii problem. Or you could create the trace in another way...
Closed, unless there will be a clear way to reproduce it.
3 years later... I found this issue when googling... the same debug_get_function_stack() issue
So... I opened an xdebug issue
https://bugs.xdebug.org/view.php?id=1529
nutshell: xdebug issue opened Feb 2018 when at least 2 or 3 people knew about the issue in Apr 2015
Most helpful comment
3 years later... I found this issue when googling... the same debug_get_function_stack() issue
So... I opened an xdebug issue
https://bugs.xdebug.org/view.php?id=1529
nutshell: xdebug issue opened Feb 2018 when at least 2 or 3 people knew about the issue in Apr 2015