A
A
Alexander Ivanov2018-05-20 21:16:25
Yii
Alexander Ivanov, 2018-05-20 21:16:25

Why doesn't Yii::$app work?

I am transferring the site from Open Server (Windows) to MAMP (Mac OS). I can't figure out why the Yii::$app construction doesn't work? Error - Trying to get property 'status' of non-object. I extract user data from $app to form the interface.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2018-05-20
@kawabanga

Get in the habit of quoting whatever you wish to request.
I can't figure out why the Yii::$app construction doesn't work?
- because she has a vacation, summer is coming soon.
Error - Trying to get property 'status' of non-object.
- checked if the user is logged in? For example, you request Yii::$app->user->identity, but in fact you have user - null, and then identity null, and so on.
check first if you have Yii::$app->user->isGuest and only then certain user properties.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question