tormjens / eventy

WordPress-like actions and filters for Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too few arguments error

freescout-helpdesk opened this issue · comments

If one of the parameters passed to \Eventy::filter() (or 'action()') is null you will get "Too few arguments..." error:

    \Eventy::addFilter('filter_name', function($test1, $test2) {
        return $test1;
    }, 20, 2);

    $test1 = 1;
    $tes2 = null;
    \Eventy::filter('filter_name', $test1, $test2);

@freescout-helpdesk Sorry for the late response. I'll look into this. Thanks for reporting.

Fixed in 0.5.6 :)

Same issue with actions (Action.php)

@freescout-helpdesk Should be fixed in the latest release. If you have any further issues, please open a new issue.