Исправлен NPE в AccountOwner

This commit is contained in:
ErickSkrauch
2017-12-23 01:10:54 +03:00
parent bd3e8cf2bd
commit 3138a74a7f
2 changed files with 14 additions and 1 deletions

View File

@@ -30,7 +30,10 @@ class AccountOwner extends Rule {
}
$identity = Yii::$app->user->findIdentityByAccessToken($accessToken);
/** @noinspection NullPointerExceptionInspection это исключено, т.к. уже сработал authManager */
if ($identity === null) {
return false;
}
$account = $identity->getAccount();
if ($account === null) {
return false;