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:
mark_story 2016-02-18 21:03:57 -05:00
parent 68082fad02
commit 7a5907057a

View file

@ -368,7 +368,7 @@ class DataSource extends Object {
} else { } else {
$found = false; $found = false;
foreach (array_reverse($stack) as $assocData) { 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]; $val = $data[$assocData][$insertKey];
$found = true; $found = true;
break; break;