From: Friendika Date: Mon, 10 Jan 2011 21:57:59 +0000 (-0800) Subject: fallback dbesc() when db is not there X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb1832a7550c2527d0bd4856c7ab90622e7f3a74;p=friendica.git fallback dbesc() when db is not there --- diff --git a/include/dba.php b/include/dba.php index ae3a4957b6..98823df3ae 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)); }}