Fix some parse/undefined variable errors.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 9 Oct 2009 22:33:39 +0000 (16:33 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 11 Oct 2009 19:31:34 +0000 (13:31 -0600)
framework/Image/lib/Horde/Image/Im.php

index dc3f463..3795ba4 100644 (file)
@@ -94,18 +94,17 @@ class Horde_Image_Im extends Horde_Image_Base
      */
     public function raw($convert = false)
     {
-        if (!empty($this->_data)) {
+        if (empty($this->_data) ||
             // If there are no operations, and we already have data, don't
             // bother writing out files, just return the current data.
-            if (!$convert &&
-                !count($this->_operations) &&
-                !count($this->_postSrcOperations)) {
-                return $this->_data;
-            }
-
-            $tmpin = $this->toFile($this->_data);
+            (!$convert &&
+             !count($this->_operations) &&
+             !count($this->_postSrcOperations))) {
+            return $this->_data;
         }
 
+        $tmpin = $this->toFile($this->_data);
+
         // Perform convert command if needed
         if (count($this->_operations) || count($this->_postSrcOperations) || $convert) {
             $tmpout = Horde_Util::getTempFile('img', false, $this->_tmpdir);
@@ -116,7 +115,7 @@ class Horde_Image_Im extends Horde_Image_Base
             $this->_logDebug(sprintf("convert command executed by Horde_Image_im::raw(): %s", $command));
             exec($command, $output, $retval);
             if ($retval) {
-                $this->_logErr(sprintf("Error running command: %s"), $command . "\n" . implode("\n", $output));
+                $this->_logErr(sprintf("Error running command: %s", $command . "\n" . implode("\n", $output)));
             }
 
             /* Empty the operations queue */