Skip to content
Permalink
Browse files

Use preg_match to allow all kinds of finders.

  • Loading branch information...
markstory committed Dec 2, 2013
1 parent 58b51ce commit 0f584b7305b7c6c0667848fd9d24164ff86a86e0
Showing with 1 addition and 1 deletion.
  1. +1 −1 Cake/ORM/Table.php
@@ -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);
}

0 comments on commit 0f584b7

Please sign in to comment.
You can’t perform that action at this time.