Merge pull request #4609 from tractorcow/pulls/3.1/fix-classinfo-breakage

BUG Fix ClassInfo::table_for_object_field
This commit is contained in:
Hamish Friedlander 2015-09-17 14:45:17 +12:00
commit a59a90c6b5

View File

@ -301,7 +301,11 @@ class ClassInfo {
* @return string
*/
public static function table_for_object_field($candidateClass, $fieldName) {
if(!$candidateClass || !$fieldName || !is_subclass_of($candidateClass, 'DataObject')) {
if(!$candidateClass
|| !$fieldName
|| !class_exists($candidateClass)
|| !is_subclass_of($candidateClass, 'DataObject')
) {
return null;
}