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')) {
|
if(! function_exists('dbesc')) {
|
||||||
function dbesc($str) {
|
function dbesc($str) {
|
||||||
global $db;
|
global $db;
|
||||||
|
if($db)
|
||||||
return($db->escape($str));
|
return($db->escape($str));
|
||||||
|
else
|
||||||
|
return(str_replace("'","\\'",$str));
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue