10quality / wpmvc-commands

Ayuco commands for Wordpress MVC,
MIT License
2 stars 4 forks source link

RegisterCommand for widget throws undefined constant _empty_ error #36

Closed garretthyder closed 4 years ago

garretthyder commented 4 years ago

Hello @amostajo

Running php ayuco register widget:[WidgetName] I get the following warning;

Warning: Use of undefined constant empty - assumed 'empty' (this will throw an Error in a future version of PHP) in /Path/to/project/vendor/10quality/wpmvc-commands/src/Traits/RegisterWidgetTrait.php on line 66 Notice: Trying to get property 'empty' of non-object in /Path/to/project/vendor/10quality/wpmvc-commands/src/Traits/RegisterWidgetTrait.php on line 66

This seems to refer to these lines; https://github.com/10quality/wpmvc-commands/blob/v1.0/src/Traits/RegisterWidgetTrait.php#L66-L74

My PHP version is 7.2.8.

And to note the widget is registered so this is just a warning for now but it did indicate '(this will throw an Error in a future version of PHP)'