AbstractDatabaseObjectAction no longer ignores unknown actions
authorMarcel Werk <burntime@woltlab.com>
Sun, 9 Dec 2012 21:16:52 +0000 (22:16 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sun, 9 Dec 2012 21:16:52 +0000 (22:16 +0100)
wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php

index 41b1f2dba4a04f43aa4b5d2ef64cafa9ed04ba5c..7a03c86fee199648486c6386a49ff78cab07c038 100644 (file)
@@ -158,9 +158,11 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID
         */
        public function executeAction() {
                // execute action
-               if (method_exists($this, $this->getActionName())) {
-                       $this->returnValues = call_user_func(array($this, $this->getActionName()));
-               }
+               if (!method_exists($this, $this->getActionName())) {
+                       throw new SystemException("call to undefined function '".$this->getActionName()."'");
+               }       
+                       
+               $this->returnValues = call_user_func(array($this, $this->getActionName()));
                
                // reset cache
                if (ClassUtil::isInstanceOf($this->className, 'wcf\data\IEditableCachedObject')) {