From 036f292328dddf18971993e9c93a7757e212eb7e Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 21 Jan 2006 01:40:43 +0000 Subject: [PATCH] Make sure we throw a warning if we can't call the APIError() function --- api.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api.php b/api.php index f5b013b..6eb217e 100644 --- a/api.php +++ b/api.php @@ -164,6 +164,11 @@ class API */ function error($message) { + if (!is_callable(APIError())) + { + trigger_error('No APIError() handler has been set', E_USER_WARNING); + } + call_user_func(APIError(), $message); } -- 2.22.5