Closed attybean closed 6 years ago
https://github.com/yiisoft/yii2/blob/9e5c4abdb8d99811b8c4fdc5dc376e22c9f0d662/framework/rbac/BaseManager.php#L275 Change line 275 from : if ($rule instanceof Rule) { to if ($rule instanceof \yii\rbac\Rule) {
if ($rule instanceof Rule) {
if ($rule instanceof \yii\rbac\Rule) {
as suggested in: [https://stackoverflow.com/questions/30278401/php-instanceof-returns-false-for-true-condition]
otherwise you can risk getting a false negative: Rule not found:
System Setup: PHP Version 7.0.31-1+0~ 20180725100222.2+jessie~1.gbp8e8a8b 10.1.26-MariaDB-0+deb9u1 - Debian 9.1 Apache/2.4.25 (Debian)
It is fine as is - Rule actually points to yii\rbac\Rule, there is not need to use FQN here.
Rule
yii\rbac\Rule
https://github.com/yiisoft/yii2/blob/9e5c4abdb8d99811b8c4fdc5dc376e22c9f0d662/framework/rbac/BaseManager.php#L275 Change line 275 from :
if ($rule instanceof Rule) {
toif ($rule instanceof \yii\rbac\Rule) {
as suggested in: [https://stackoverflow.com/questions/30278401/php-instanceof-returns-false-for-true-condition]
otherwise you can risk getting a false negative: Rule not found:
System Setup: PHP Version 7.0.31-1+0~ 20180725100222.2+jessie~1.gbp8e8a8b 10.1.26-MariaDB-0+deb9u1 - Debian 9.1 Apache/2.4.25 (Debian)