]> source.dussan.org Git - nextcloud-server.git/commitdiff
Small fixes
authorThomas Tanghus <thomas@tanghus.net>
Sun, 1 Jan 2012 19:06:35 +0000 (20:06 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Sun, 1 Jan 2012 19:06:35 +0000 (20:06 +0100)
lib/image.php

index 67290d21f3aaf2fd3c0ad0c23d84f3a315823491..0e1d1ee327f63badfef3cdf29b017c965e155371 100644 (file)
@@ -55,6 +55,15 @@ class OC_Image {
                }
        }
 
+       /**
+       * @brief Determine whether the object contains an image resource.
+       * returns bool
+       */
+       function empty() {
+               if(self::$resource && self::$destroy) {
+               }
+       }
+
        /**
        * @brief Prints the image.
        */
@@ -116,9 +125,6 @@ class OC_Image {
        * @returns An image resource or false on error
        */
        static public function loadFromFile($imagepath=false) {
-               if(!is_string($imagepath)) {
-                       return false;
-               }
                if(!is_file($imagepath) || !file_exists($imagepath) || !is_readable($imagepath)) {
                        OC_Log::write('core','OC_Image::loadFromFile, couldn\'t load'.$imagepath, OC_Log::DEBUG);
                        return false;