Skip to content

Commit 8e46da6

Browse files
committed
Fixes warning on assigning permission to role
Non-static method webvimark\modules\UserManagement\models\rbacDB\AbstractItem::beforeAddChildren() should not be called statically
1 parent 4c40bde commit 8e46da6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

models/rbacDB/AbstractItem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ public function afterDelete()
256256
AuthHelper::invalidatePermissions();
257257
}
258258

259-
public function beforeAddChildren($parentName, $childrenNames, $throwException = false)
259+
public static function beforeAddChildren($parentName, $childrenNames, $throwException = false)
260260
{
261261
$event = new AbstractItemEvent(compact('parentName', 'childrenNames', 'throwException'));
262262
$event->trigger(get_called_class(), self::EVENT_BEFORE_ADD_CHILDREN, $event);
263263
}
264264

265-
public function beforeRemoveChildren($parentName, $childrenNames)
265+
public static function beforeRemoveChildren($parentName, $childrenNames)
266266
{
267267
$event = new AbstractItemEvent(compact('parentName', 'childrenNames', 'throwException'));
268268
$event->trigger(get_called_class(), self::EVENT_BEFORE_REMOVE_CHILDREN, $event);
269269
}
270-
}
270+
}

0 commit comments

Comments
 (0)