mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Fixed reference to fieldExists() on SearchFilter which was removed from DataObject (from r93738)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93939 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3216c96a69
commit
a0092fb348
@ -128,7 +128,7 @@ abstract class SearchFilter extends Object {
|
||||
// Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be?
|
||||
$candidateClass = $this->model;
|
||||
while($candidateClass != 'DataObject') {
|
||||
if(singleton($candidateClass)->fieldExists($this->name)) break;
|
||||
if(singleton($candidateClass)->hasField($this->name)) break;
|
||||
$candidateClass = get_parent_class($candidateClass);
|
||||
}
|
||||
if($candidateClass == 'DataObject') user_error("Couldn't find field $this->name in any of $this->model's tables.", E_USER_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user