diff --git a/db.class.php b/db.class.php index bac4438..24a61f3 100644 --- a/db.class.php +++ b/db.class.php @@ -58,7 +58,12 @@ class DB { } public static function __callStatic($name, $args) { - return call_user_func_array(array(DB::getMDB(), $name), $args); + $fn = array(DB::getMDB(), $name); + if (! is_callable($fn)) { + throw new MeekroDBException("MeekroDB does not have a method called $name"); + } + + return call_user_func_array($fn, $args); } public static function debugMode($handler = true) {