Explicitly casting to string a variable that could in times be either string or integer

This commit is contained in:
Jose Lorenzo Rodriguez 2012-01-11 21:25:22 -04:30
parent c029316a62
commit c53f0e6877

View file

@ -185,6 +185,7 @@ class CakeRoute {
return false;
}
foreach ($this->defaults as $key => $val) {
$key = (string) $key;
if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) {
if (isset($this->_headerMap[$header[1]])) {
$header = $this->_headerMap[$header[1]];