Skip to content

Commit

Permalink
Use preg_match to allow all kinds of finders.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 2, 2013
1 parent 58b51ce commit 0f584b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cake/ORM/Table.php
Expand Up @@ -1315,7 +1315,7 @@ public function __call($method, $args) {
if ($this->_behaviors && $this->_behaviors->hasMethod($method)) {
return $this->_behaviors->call($method, $args);
}
if (strpos($method, 'findBy') === 0 || strpos($method, 'findAllBy') === 0) {
if (preg_match('/^find(?:\w+)?By/', $method) > 0) {
return $this->_dynamicFinder($method, $args);
}

Expand Down

0 comments on commit 0f584b7

Please sign in to comment.