aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dba.php5
1 files changed, 4 insertions, 1 deletions
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));
}}