Commit 22c9eacf by seldaek

Calling an undefined method on Dwoo now throws an exception if there is no plugin proxy, refs #51

git-svn-id: http://svn.dwoo.org/trunk@324 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent cb3c2b55
...@@ -1558,6 +1558,10 @@ class Dwoo ...@@ -1558,6 +1558,10 @@ class Dwoo
* @return mixed * @return mixed
*/ */
public function __call($method, $args) { public function __call($method, $args) {
return call_user_func_array($this->getPluginProxy()->getCallback($method), $args); $proxy = $this->getPluginProxy();
if (!$proxy) {
throw new Dwoo_Exception('Call to undefined method '.__CLASS__.'::'.$method.'()');
}
return call_user_func_array($proxy->getCallback($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