diff --git a/library/Zend/Json/Client/SMD.php b/library/Zend/Json/Client/SMD.php index 484134034..20cea717a 100644 --- a/library/Zend/Json/Client/SMD.php +++ b/library/Zend/Json/Client/SMD.php @@ -56,7 +56,16 @@ public function loadJson($json) */ public function getMethodSignature($method) { - if(!(isset($this->_smd['services'][$method]) || array_key_exists($method, $this->_smd['services']))) { + if (!isset($this->_smd['services'])) { + /** + * Exception thrown when method not found + * @see Zend_Json_Client_IntrospectException + */ + require_once 'Zend/Json/Client/IntrospectException.php'; + throw new Zend_Json_Client_IntrospectException("no services found in smd"); + } + + if (!(isset($this->_smd['services'][$method]) || array_key_exists($method, $this->_smd['services']))) { /** * Exception thrown when method not found * @see Zend_Json_Client_IntrospectException