M
M
Maxim Timofeev2015-12-14 20:55:17
Yii
Maxim Timofeev, 2015-12-14 20:55:17

Why is debug panel dying in yii2?

On a certain page of the site, the debug panel displays (this code pops up in the panel itself, instead of it):

PHP Fatal Error 'yii\base\ErrorException' with message 'Call to a member function formName() on null' 

in L:\domains\newtm\yii\vendor\yiisoft\yii2\helpers\BaseHtml.php:1882

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

Line 1882 from L:\domains\newtm\yii\vendor\yiisoft\yii2\helpers\BaseHtml.php:1882
$formName = $model->formName();
The page itself works fine. What can be wrong? Any ideas?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wol_fi, 2015-12-14
@wol_fi

What can be wrong? Any ideas?

You have null in $model; Look where it is defined, what is assigned there.
Where is my boat?

A
Alexander Makarov, 2015-12-15
@SamDark

1. We take the basic application template.
2. We write as little code as possible so that the problem is reproduced.
3. Upload to https://github.com/yiisoft/yii2-debug/issues/new

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question