Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$throwException is missing #221

Open
unrealmach opened this issue Jan 15, 2021 · 2 comments
Open

$throwException is missing #221

unrealmach opened this issue Jan 15, 2021 · 2 comments

Comments

@unrealmach
Copy link

$event = new AbstractItemEvent(compact('parentName', 'childrenNames', 'throwException'));

@unrealmach
Copy link
Author

unrealmach commented Jan 15, 2021

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

S.O. Ubuntu 18
Php: 7.2, 7.4

@Darkhyrax
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants