mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #4405 from christopherdarling/patch-1
FIX: DataQuery uses an undefined variable $callerClass in user_error() message
This commit is contained in:
commit
271f64e9b2
@ -223,7 +223,7 @@ class DataQuery {
|
||||
if($this->dataClass != $baseClass) {
|
||||
// Get the ClassName values to filter to
|
||||
$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);
|
||||
$query->addWhere("\"$baseClass\".\"ClassName\" IN (" . implode(",", $classNames) . ")");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user