cant use private members from closure in php <5.4

This commit is contained in:
Robin Appelman 2013-07-10 01:55:38 +02:00
parent 912b151561
commit c2bff656ff
1 changed files with 3 additions and 3 deletions

View File

@ -47,12 +47,12 @@ class Manager extends PublicEmitter {
*/
public function __construct($userManager) {
$this->userManager = $userManager;
$manager = $this;
$this->listen('\OC\Group', 'delete', function ($group) use (&$manager) {
$cache = &$this->cachedGroups;
$this->listen('\OC\Group', 'delete', function ($group) use (&$cache) {
/**
* @var \OC\Group\Group $group
*/
unset($manager->cachedGroups[$group->getGID()]);
unset($cache[$group->getGID()]);
});
}