Merge branch 'master' of /var/cache/git/phpfspot
authorAndreas Unterkircher <unki@netshadow.at>
Sun, 30 Dec 2007 12:45:49 +0000 (13:45 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Sun, 30 Dec 2007 12:45:49 +0000 (13:45 +0100)
phpfspot.class.php

index 5e641172d6c0157cb0ec1d2a3892cb3961bc5a8a..89017e0d4fcb98bce165e2ef9d9c6e3170b998fb 100644 (file)
@@ -300,13 +300,19 @@ class PHPFSPOT {
          ";
       }
 
-      $result = $this->db->db_query($query_str);
+      if($result = $this->db->db_query($query_str)) {
 
-      if($this->dbver < 9) {
-         $result['uri'] = "file://". $result['directory_path'] ."/". $result['name'];
-      }
+         $row = $this->db->db_fetch_object($result);
+
+         if($this->dbver < 9) {
+            $row['uri'] = "file://". $row['directory_path'] ."/". $row['name'];
+         }
 
-      return $this->db->db_fetch_object($result);
+         return $row;
+
+      }
+   
+      return null;
 
    } // get_photo_details