Skip to content

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

Merged
taylorotwell merged 1 commit intolaravel:5.4from
u1735067:patch-1
Jul 25, 2017
Merged

[5.4] Respect the signature of whereRaw, fix #18952#20234
taylorotwell merged 1 commit intolaravel:5.4from
u1735067:patch-1

Conversation

@u1735067
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@u1735067
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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