fallback dbesc() when db is not there

This commit is contained in:
Friendika 2011-01-10 13:57:59 -08:00
parent b2176538f4
commit cb1832a755

View file

@ -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));
}}