From 7e7ac368b2fdab8231920ad3d8faeabd96986eda Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sat, 22 Jan 2011 20:28:10 +0000 Subject: [PATCH] [TASK] I don't know what changed, but it might be important. --- Classes/Client/ClientManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Client/ClientManager.php b/Classes/Client/ClientManager.php index ddb5105..6e7eca1 100644 --- a/Classes/Client/ClientManager.php +++ b/Classes/Client/ClientManager.php @@ -185,7 +185,9 @@ class Client_ClientManager { $className = "Client_" . $protocol . "Client"; //look for the class if(class_exists($className)) { - return new $className(); + $client = new $className(); + if(!$client instanceof Client_AbstractClient) throw new Exception_GeneralException("Class '" . $className . "' does not implement the AbstractClient-API!", 1294837055); + return $client; } else { throw new Exception_GeneralException("Registered class name '" . $className . "' does not exist for protocol: '" . $protocol . "'!", 1290271773); }