Browse Source

fix for ZF-7102

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@16385 44c647ce-9c0f-0410-b52a-842ac1e357ba
stas 16 years ago
parent
commit
e1805b7b2d
1 changed files with 12 additions and 2 deletions
  1. 12 2
      library/Zend/Amf/Server.php

+ 12 - 2
library/Zend/Amf/Server.php

@@ -61,6 +61,15 @@ class Zend_Amf_Server implements Zend_Server_Interface
      * @var array
      */
     protected $_methods = array();
+    
+    /**
+     * Array of classes that can be called without being explicitly loaded
+     * 
+     * Keys are class names.
+     *
+     * @var array
+     */
+    protected $_classAllowed = array();
 
     /**
      * Loader for classes in added directories
@@ -304,7 +313,7 @@ class Zend_Amf_Server implements Zend_Server_Interface
                 	$this->getLoader()->load($className);
                 } catch (Exception $e) {
                     require_once 'Zend/Amf/Server/Exception.php';
-                    throw new Zend_Amf_Server_Exception('Class "' . $className . '" does not exist');
+                    throw new Zend_Amf_Server_Exception('Class "' . $className . '" does not exist: '.$e->getMessage());
                 }
                 // Add the new loaded class to the server.
                 $this->setClass($className, $source);
@@ -340,7 +349,8 @@ class Zend_Amf_Server implements Zend_Server_Interface
                     $object = $info->getDeclaringClass()->newInstance();
                 } catch (Exception $e) {
                     require_once 'Zend/Amf/Server/Exception.php';
-                    throw new Zend_Amf_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $info->getName(), 621);
+                    file_put_contents("c:/windows/temp/a", $e->getMessage());
+                    throw new Zend_Amf_Server_Exception('Error instantiating class ' . $class . ' to invoke method ' . $info->getName() . ': '.$e->getMessage(), 621);
                 }
                 $this->_checkAcl($object, $info->getName());
                 $return = $info->invokeArgs($object, $params);