mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Ensure keys are strings before accessing them.
Some userland datasources (namely an oracle driver) manage to get arrays into $stack. Refs #8281
This commit is contained in:
parent
68082fad02
commit
7a5907057a
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ class DataSource extends Object {
|
|||
} else {
|
||||
$found = false;
|
||||
foreach (array_reverse($stack) as $assocData) {
|
||||
if (isset($data[$assocData]) && isset($data[$assocData][$insertKey])) {
|
||||
if (is_string($assocData) && isset($data[$assocData]) && isset($data[$assocData][$insertKey])) {
|
||||
$val = $data[$assocData][$insertKey];
|
||||
$found = true;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue