yiisoft / yii2-debug

Debug Extension for Yii 2
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
202 stars 150 forks source link

Call to a member function diff() on boolean #408

Closed dicrtarasov closed 5 years ago

dicrtarasov commented 5 years ago

Just view the previous request at /debug/default/view?tag=5d659cff3b4a6

Got Error:

Error: Call to a member function diff() on boolean in /home/eurotools/public_new/vendor/yiisoft/yii2-debug/src/views/default/panels/log/detail.php:79
Stack trace:
#0 [internal function]: yii\base\View::{closure}(Array, 0, 0, Object(yii\grid\DataColumn))
#1 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/DataColumn.php(230): call_user_func(Object(Closure), Array, 0, 0, Object(yii\grid\DataColumn))
#2 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/DataColumn.php(244): yii\grid\DataColumn->getDataCellValue(Array, 0, 0)
#3 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/Column.php(111): yii\grid\DataColumn->renderDataCellContent(Array, 0, 0)
#4 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/GridView.php(525): yii\grid\Column->renderDataCell(Array, 0, 0)
#5 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/GridView.php(494): yii\grid\GridView->renderTableRow(Array, 0, 0)
#6 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/GridView.php(358): yii\grid\GridView->renderTableBody()
#7 /home/eurotools/public_new/vendor/yiisoft/yii2/widgets/BaseListView.php(160): yii\grid\GridView->renderItems()
#8 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/GridView.php(326): yii\widgets\BaseListView->renderSection('{items}')
#9 /home/eurotools/public_new/vendor/yiisoft/yii2/widgets/BaseListView.php(135): yii\grid\GridView->renderSection('{items}')
#10 [internal function]: yii\widgets\BaseListView->yii\widgets\{closure}(Array)
#11 /home/eurotools/public_new/vendor/yiisoft/yii2/widgets/BaseListView.php(138): preg_replace_callback('/{\\w+}/', Object(Closure), '{summary}\n{item...')
#12 /home/eurotools/public_new/vendor/yiisoft/yii2/grid/GridView.php(301): yii\widgets\BaseListView->run()
#13 /home/eurotools/public_new/vendor/yiisoft/yii2/base/Widget.php(140): yii\grid\GridView->run()
#14 /home/eurotools/public_new/vendor/yiisoft/yii2-debug/src/views/default/panels/log/detail.php(15): yii\base\Widget::widget(Array)
#15 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(348): require('/home/eurotools...')
#16 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/eurotools...', Array)
#17 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/home/eurotools...', Array, NULL)
#18 /home/eurotools/public_new/vendor/yiisoft/yii2-debug/src/panels/LogPanel.php(56): yii\base\View->render('panels/log/deta...', Array)
#19 /home/eurotools/public_new/vendor/yiisoft/yii2-debug/src/views/default/view.php(107): yii\debug\panels\LogPanel->getDetail()
#20 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(348): require('/home/eurotools...')
#21 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/eurotools...', Array)
#22 /home/eurotools/public_new/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/home/eurotools...', Array, Object(yii\debug\controllers\DefaultController))
#23 /home/eurotools/public_new/vendor/yiisoft/yii2/base/Controller.php(384): yii\base\View->render('view', Array, Object(yii\debug\controllers\DefaultController))
#24 /home/eurotools/public_new/vendor/yiisoft/yii2-debug/src/controllers/DefaultController.php(127): yii\base\Controller->render('view', Array)
#25 [internal function]: yii\debug\controllers\DefaultController->actionView('5d659cff3b4a6', NULL)
#26 /home/eurotools/public_new/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#27 /home/eurotools/public_new/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#28 /home/eurotools/public_new/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('view', Array)
#29 /home/eurotools/public_new/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('debug/default/v...', Array)
#30 /home/eurotools/public_new/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))
#31 /home/eurotools/public_new/web/index.php(13): yii\base\Application->run()
#32 {main}

The error is occuring when viewing history details of requests with long response time (more then 60 sec). My request tooks 1.1 min. Also, when page is opened, no debug panel appeared, because of error.

Screenshot with source lines: Без названия

Additional info

yii2: 2.0.25 yii2-debug: 2.1.8 PHP: 7.2 Linux

machour commented 5 years ago

This seems to have been fixed in yii2-debug 2.1.9, by https://github.com/yiisoft/yii2-debug/commit/f9d72bf8dc609f65223aad3b4180e551e51261a2#diff-182f6096f8bd890971abc71c498bdc14L79

@dicrtarasov Can you try to reproduce the issue with the latest version? Haven't succeeded on my side with sleep(90)

samdark commented 5 years ago

Closing for now. @dicrtarasov please ping us if you still can reproduce it.