Merge pull request #4405 from christopherdarling/patch-1

FIX: DataQuery uses an undefined variable $callerClass in user_error() message
This commit is contained in:
Daniel Hensby 2015-07-16 16:15:27 +01:00
commit 271f64e9b2

View File

@ -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) . ")");
} }