summaryrefslogtreecommitdiffstats
path: root/lib/class/database_object.abstract.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-10 21:45:15 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2009-03-10 21:45:15 +0000
commiteda8070b7f3dfb1a34c10afe72b6d3f387d6f235 (patch)
treee92d64e75ddf1e5d94d03af5e8302322bedf7a6c /lib/class/database_object.abstract.php
parentc27481203cbe8f7b6bc407718c3abd8b3f9d6307 (diff)
downloadampache-eda8070b7f3dfb1a34c10afe72b6d3f387d6f235.tar.gz
ampache-eda8070b7f3dfb1a34c10afe72b6d3f387d6f235.tar.bz2
ampache-eda8070b7f3dfb1a34c10afe72b6d3f387d6f235.zip
fix tags in the api
Diffstat (limited to 'lib/class/database_object.abstract.php')
-rw-r--r--lib/class/database_object.abstract.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/class/database_object.abstract.php b/lib/class/database_object.abstract.php
index e26b22df..d7408f4e 100644
--- a/lib/class/database_object.abstract.php
+++ b/lib/class/database_object.abstract.php
@@ -39,6 +39,9 @@ abstract class database_object {
$table_name = $table_name ? Dba::escape($table_name) : Dba::escape(strtolower(get_class($this)));
+ // Make sure we've got a real id
+ if (!is_numeric($id)) { return array(); }
+
if (self::is_cached($table_name,$id)) {
return self::get_from_cache($table_name,$id);
}