summaryrefslogtreecommitdiffstats
path: root/lib/class/database_object.abstract.php
diff options
context:
space:
mode:
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);
}