fallback dbesc() when db is not there
This commit is contained in:
parent
b2176538f4
commit
cb1832a755
|
@ -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));
|
||||
}}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue