← Back to News & Newsletter Support
"substr() expects parameter 1 to be string, array given" on line 469 of /web/home/designrhythm/html/vendor/laravel/framework/src/Illuminate/Support/Str.php
Probably this issue will be fix on October build 447. Try to set one option for "Show the following post on front-end as backend user" in the Setting > CMS > News and Newsletter page.
Last updated
I can't see the option "Show the following post on front-end as backend user" Because only I can see is red bg and error message.
(array instead of string)
/www/project_name/plugins/indikator/news/models/settings/fields.yaml
line 48
change default: [1, 3]
to default: 1, 2, 3
Try to update from October version 467 to 468 version an get the same error like you: ErrorException: substr() expects parameter 1 to be string, array given in /home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Support/Str.php:469
Maybe its something related to cookies. Because on the other projects when I updated the same I got loged out during update Finish and had to login again in the backend.
Stack Trace: ErrorException: substr() expects parameter 1 to be string, array given in /home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Support/Str.php:469
0[internal function]:Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'substr() expect...', '/home/UserAccount...', 469, Array)
1/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Support/Str.php(469): substr(Array, 0, 41)
2/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(806): Illuminate\Support\Str::startsWith(Array, '9b6e2a2d34b3049...')
3/home/UserAccount/public_html/vendor/october/rain/src/Cookie/CookieValuePrefix.php(42): starts_with(Array, '9b6e2a2d34b3049...')
4/home/UserAccount/public_html/vendor/october/rain/src/Cookie/Middleware/EncryptCookies.php(84): October\Rain\Cookie\CookieValuePrefix::getVerifiedValue('admin_auth', Array, 'gtf5wT2hKA5zkEY...')
5/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): October\Rain\Cookie\Middleware\EncryptCookies->decrypt(Object(Illuminate\Http\Request))
6/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
7/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
8/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
9/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(660): Illuminate\Pipeline\Pipeline->then(Object(Closure))
10/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(635): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
11/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(601): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
12/home/UserAccount/public_html/vendor/october/rain/src/Router/CoreRouter.php(20): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
13/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): October\Rain\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
14/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}(Object(Illuminate\Http\Request))
15/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
16/home/UserAccount/public_html/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php(25): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
17/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
18/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))
19/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))
20/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\Pipeline\Pipeline->then(Object(Closure))
21/home/UserAccount/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
22/home/UserAccount/public_html/index.php(43): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
If need any extra info please let me know. The error ocurs at update Finish step WHn I gen Update Failed error with the error mentioned above and after that step I had to rollback to earlyer backup of the files because the backend or fron-end were not accesible anymore.
All the best.
Last updated
RempadDesign said: Try to update from October version 467 to 468 version an get the same error like you: Maybe its something related to cookies
Delete admin_auth
cookie and you're good to go.
More info: https://github.com/octobercms/october/issues/5226
1-9 of 9