mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: $callerClass is undefined
replaced with $this->dataClass
This commit is contained in:
parent
bd316b9002
commit
a3201d6ed9
@ -223,7 +223,7 @@ class DataQuery {
|
|||||||
if($this->dataClass != $baseClass) {
|
if($this->dataClass != $baseClass) {
|
||||||
// Get the ClassName values to filter to
|
// Get the ClassName values to filter to
|
||||||
$classNames = ClassInfo::subclassesFor($this->dataClass);
|
$classNames = ClassInfo::subclassesFor($this->dataClass);
|
||||||
if(!$classNames) user_error("DataList::create() Can't find data sub-classes for '$callerClass'");
|
if(!$classNames) user_error("DataList::create() Can't find data sub-classes for '{$this->dataClass}'");
|
||||||
$classNames = array_map(array(DB::getConn(), 'prepStringForDB'), $classNames);
|
$classNames = array_map(array(DB::getConn(), 'prepStringForDB'), $classNames);
|
||||||
$query->addWhere("\"$baseClass\".\"ClassName\" IN (" . implode(",", $classNames) . ")");
|
$query->addWhere("\"$baseClass\".\"ClassName\" IN (" . implode(",", $classNames) . ")");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user