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

[10.x] Don't crash if replacement cannot be represented as a string #48530

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

GrahamCampbell
Copy link
Member

Fixes

Error Object of class stdClass could not be converted to string 
    vendor/laravel/framework/src/Illuminate/Support/Str.php:989 Illuminate\Support\Str::replaceArray
    vendor/laravel/framework/src/Illuminate/Database/QueryException.php:67 Illuminate\Database\QueryException::formatMessage
    vendor/laravel/framework/src/Illuminate/Database/QueryException.php:49 Illuminate\Database\QueryException::__construct
    vendor/laravel/framework/src/Illuminate/Database/Connection.php:801 Illuminate\Database\Connection::runQueryCallback
    vendor/laravel/framework/src/Illuminate/Database/Connection.php:755 Illuminate\Database\Connection::run
    vendor/laravel/framework/src/Illuminate/Database/Connection.php:407 Illuminate\Database\Connection::select
    vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:469 Illuminate\Database\DatabaseManager::__call
    vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:353 Illuminate\Support\Facades\Facade::__callStatic

@taylorotwell taylorotwell marked this pull request as draft September 25, 2023 13:48
@GrahamCampbell GrahamCampbell force-pushed the repl-str-fail branch 3 times, most recently from 2bfc677 to de8e9ca Compare October 4, 2023 19:06
@GrahamCampbell GrahamCampbell marked this pull request as ready for review October 4, 2023 19:19
@GrahamCampbell
Copy link
Member Author

Finally got around to finishing this off. Sorry!

@taylorotwell taylorotwell merged commit fcceb52 into laravel:10.x Oct 6, 2023
19 checks passed
@GrahamCampbell GrahamCampbell deleted the repl-str-fail branch October 6, 2023 13:42
timacdonald pushed a commit to timacdonald/framework that referenced this pull request Oct 24, 2023
…aravel#48530)

* Don't crash if replacement cannot be represented as a string

* Update Str.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
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