Skip to content

Error while onEachRule('field', 'in, []) #64

@jclaveau

Description

@jclaveau
ErrorException [ Warning ]: reset() expects parameter 1 to be array, null given
/home/jean/dev/mediabong/www_2/vendor/jclaveau/php-logical-filter/src/Filterer/RuleFilterer.php [ 225 ]

This bug occurres while formating dates for sql query generation for example:

            $filter->onEachRule(['field', 'in', array_keys($dates)], function ($rule, $key, array &$siblings) {
                // Debug::dumpJson($rule, true);
                $class = get_class($rule);
                $siblings[$key] = new $class( $rule->getField(), $rule->getValues()->format('Y-m-d') );
            })

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions