user-management icon indicating copy to clipboard operation
user-management copied to clipboard

$throwException is missing

Open unrealmach opened this issue 4 years ago • 2 comments

https://github.com/webvimark/user-management/blob/ae159f7eeb6bc98bfac830dc17b69ad641a811a2/models/rbacDB/AbstractItem.php#L270

unrealmach avatar Jan 15 '21 13:01 unrealmach

$throwException is missing in the wrapper method and the compact function throws an exeption.

S.O. Ubuntu 18 Php: 7.2, 7.4

unrealmach avatar Jan 15 '21 14:01 unrealmach

Hey, i had the same problem, since php7.3 version compact have this behaviour: compact() now issues an E_NOTICE level error if a given string refers to an unset variable. Formerly, such strings have been silently skipped.

So i had to go to the function and add the ThrowException variable by myself:

public static function beforeRemoveChildren($parentName, $childrenNames)
	{
		$throwException = null; //Missing variable error, you must add

		$event = new AbstractItemEvent(compact('parentName', 'childrenNames', 'throwException'));
		$event->trigger(get_called_class(), self::EVENT_BEFORE_REMOVE_CHILDREN, $event);
	}

Hope it works for you. Greetings

Darkhyrax avatar Mar 02 '21 02:03 Darkhyrax