Catch non-existant image even if using Horde_Themes_Image.
authorJan Schneider <jan@horde.org>
Mon, 23 Aug 2010 12:51:54 +0000 (14:51 +0200)
committerJan Schneider <jan@horde.org>
Mon, 23 Aug 2010 12:51:54 +0000 (14:51 +0200)
framework/Core/lib/Horde.php

index 6b21677..5c785ce 100644 (file)
@@ -1422,9 +1422,9 @@ HTML;
         /* Only encode image files if they are below the dataurl limit. */
         if (!($in instanceof Horde_Themes_Image)) {
             $in = Horde_Themes_Image::fromUri($in);
-            if (!file_exists($in->fs)) {
-                return $in->uri;
-            }
+        }
+        if (!file_exists($in->fs)) {
+            return $in->uri;
         }
 
         /* Delete approx. 50 chars from the limit to account for the various