mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Explicitly casting to string a variable that could in times be either string or integer
This commit is contained in:
parent
c029316a62
commit
c53f0e6877
1 changed files with 1 additions and 0 deletions
|
@ -185,6 +185,7 @@ class CakeRoute {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
foreach ($this->defaults as $key => $val) {
|
foreach ($this->defaults as $key => $val) {
|
||||||
|
$key = (string) $key;
|
||||||
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
|
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
|
||||||
if (isset($this->_headerMap[$header[1]])) {
|
if (isset($this->_headerMap[$header[1]])) {
|
||||||
$header = $this->_headerMap[$header[1]];
|
$header = $this->_headerMap[$header[1]];
|
||||||
|
|
Loading…
Reference in a new issue