Commit 9fbde039 authored by meus's avatar meus

remove caching of args. it is just plain wrong

parent d6b90332
...@@ -1513,15 +1513,14 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count ...@@ -1513,15 +1513,14 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
{ {
static $methods = array(); static $methods = array();
if ( isset( $methods[$method])) { if ( isset( $methods[$method])) {
$methodArray = $methods[$method]; $template = $methods[$method];
$template = $methodArray["template"];
$template->setInvoker($this); $template->setInvoker($this);
return call_user_func_array( array( $template, $method ), $methodArray["args"]); return call_user_func_array( array($template, $method ), $args);
} }
foreach ($this->_table->getTemplates() as $template) { foreach ($this->_table->getTemplates() as $template) {
if (method_exists($template, $method)) { if (method_exists($template, $method)) {
$template->setInvoker($this); $template->setInvoker($this);
$methods[$method] = array("template" => $template, "args" => $args); $methods[$method] = $template;
return call_user_func_array(array($template, $method), $args); return call_user_func_array(array($template, $method), $args);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment