Report the correct class name in exception.
authorJan Schneider <jan@horde.org>
Wed, 20 Oct 2010 16:39:13 +0000 (18:39 +0200)
committerJan Schneider <jan@horde.org>
Thu, 21 Oct 2010 08:47:57 +0000 (10:47 +0200)
framework/Mime_Viewer/lib/Horde/Mime/Viewer.php

index fe26afa..7be08b9 100644 (file)
@@ -44,12 +44,11 @@ class Horde_Mime_Viewer
         }
 
         /* Explicit class name, */
-        $class = $driver;
-        if (class_exists($class)) {
-            return new $class($part, $params);
+        if (class_exists($driver)) {
+            return new $driver($part, $params);
         }
 
-        throw new Horde_Mime_Viewer_Exception(__CLASS__ . ': Class definition of ' . $driver . ' not found.');
+        throw new Horde_Mime_Viewer_Exception(__CLASS__ . ': Class definition of ' . $class . ' not found.');
     }
 
 }