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

[5.4] Respect the signature of whereRaw, fix #18952 #20234

Merged
merged 1 commit into from
Jul 25, 2017
Merged

[5.4] Respect the signature of whereRaw, fix #18952 #20234

merged 1 commit into from
Jul 25, 2017

Conversation

u1735067
Copy link
Contributor

Would lead to

FatalThrowableError
Type error: Argument 2 passed to Illuminate\Database\Query\Builder::orWhereRaw() must be of the type array, string given

otherwise, when used with a single value.

Fix #18952, closed for no (apparent) reason.

Would lead to
```
FatalThrowableError
Type error: Argument 2 passed to Illuminate\Database\Query\Builder::orWhereRaw() must be of the type array, string given
```
otherwise.
@themsaid themsaid changed the title Respect the signature of whereRaw, fix #18952 [5.4] Respect the signature of whereRaw, fix #18952 Jul 24, 2017
@taylorotwell taylorotwell merged commit fab2e13 into laravel:5.4 Jul 25, 2017
@antonkomarev
Copy link
Contributor

But doctype said it should be an array. You should change doctype too then.

@u1735067
Copy link
Contributor Author

u1735067 commented Jul 25, 2017

What is the doctype ? (where ?)
Edit: btw, will this be reported on the 5.5 branch ?

@antonkomarev
Copy link
Contributor

antonkomarev commented Jul 25, 2017

sorry, docblock.

    /**
     * Add a raw or where clause to the query.
     *
     * @param  string  $sql
     * @param  array   $bindings
     * @return \Illuminate\Database\Query\Builder|static
     */
    public function orWhereRaw($sql, $bindings = [])
    {
        return $this->whereRaw($sql, $bindings, 'or');
    }

@u1735067
Copy link
Contributor Author

Updated in https://github.com/Alex131089/framework/commit/b95955d0303cbb327dd1eaed4328ad32911725de (same branch), does it need another pull request ?

taylorotwell pushed a commit that referenced this pull request Jul 26, 2017
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

Successfully merging this pull request may close these issues.

3 participants