generic sync script
[phpfspot.git] / 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