From cb1832a7550c2527d0bd4856c7ab90622e7f3a74 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 10 Jan 2011 13:57:59 -0800 Subject: fallback dbesc() when db is not there --- include/dba.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/dba.php b/include/dba.php index ae3a4957b..98823df3a 100644 --- a/include/dba.php +++ b/include/dba.php @@ -114,7 +114,10 @@ function dbg($state) { if(! function_exists('dbesc')) { function dbesc($str) { global $db; - return($db->escape($str)); + if($db) + return($db->escape($str)); + else + return(str_replace("'","\\'",$str)); }} -- cgit v1.2.3