diff options
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r-- | phpfspot.class.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 5e64117..89017e0 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -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 |