I
I
Igor Lavrov2017-07-04 14:21:17
Yii
Igor Lavrov, 2017-07-04 14:21:17

How to fix error when porting Yii2 to server?

Everything works fine on local. When porting to ubuntu 14, there were errors. How to fix?

PHP Notice – yii\base\ErrorException

Trying to get property of non-object

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Timofeev, 2017-07-04
@webinar

Everything works fine on local. Mistakes when porting to ubuntu 14

There were errors here and there, just errors of the Notice level were not displayed on the locals, they are not critical. You can turn off the output on the Notice server and everything will be like on the local, but I think it's better to just turn on the output of all errors on the local and fix them.

G
gents, 2017-07-04
@gents

composer install - done on the server?

P
PallMall, 2017-07-05
@PallMall

You most likely have an object not initialized and equal to null. And, accordingly, null is not an object. The same situation happened once, after the transfer. In places where the error is, check the object: or in PHP 7:
echo $obj->param ?? '';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question