Skip to content

Check number of parameters passed to where function #33

@michi-7

Description

@michi-7

Step to reproduce the problem: pass only 2 parameters to where method, the second one must be a string containing a valid SQL operator. Something like this:
$model->where('id', '<>');
This will make a query like this:
select * from table where id is not null
Where method should check the number of parameters passed and pack inside the $bag only the ones passed by the user, as eloquent already have default values for those how are missing, or skip the first check that verify if $operator is a valid SQL operator if there are only 2 parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions