mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed deprecation warning when parsing parameters in ShellDispatcher.php
PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in lib/Cake/Console/ShellDispatcher.php on line 295 It broke some behat tests for my project because PHP issued warning and then session has not been able to start correctly due to "Session cannot be started after headers have already been sent" error
This commit is contained in:
parent
b0200a75fa
commit
5dbc22efd3
1 changed files with 1 additions and 1 deletions
|
@ -292,7 +292,7 @@ class ShellDispatcher {
|
|||
$params = array_merge($defaults, array_intersect_key($this->params, $defaults));
|
||||
$isWin = false;
|
||||
foreach ($defaults as $default => $value) {
|
||||
if (strpos($params[$default], '\\') !== false) {
|
||||
if (!is_null($params[$default]) && strpos($params[$default], '\\') !== false) {
|
||||
$isWin = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue