BUG Check for instanceof SS_List rather than deprecated DataObjectSet

This commit is contained in:
Ingo Schommer 2012-08-30 20:02:10 +02:00
parent 2a3e882d70
commit 0f557915e1
1 changed files with 3 additions and 3 deletions

View File

@ -347,8 +347,8 @@ abstract class SearchIndex extends ViewableData {
// Just fail if we've fallen off the end of the chain
if (!$object) return null;
// If we're looking up this step on an array or DataObjectSet, do the step on every item, merge result
if (is_array($object) || $object instanceof DataObjectSet) {
// If we're looking up this step on an array or SS_List, do the step on every item, merge result
if (is_array($object) || $object instanceof SS_List) {
$next = array();
foreach ($object as $item) {
@ -361,7 +361,7 @@ abstract class SearchIndex extends ViewableData {
$item = $item->$property;
}
if ($item instanceof DataObjectSet) $next = array_merge($next, $item->toArray());
if ($item instanceof SS_List) $next = array_merge($next, $item->toArray());
elseif (is_array($item)) $next = array_merge($next, $item);
else $next[] = $item;
}