]> git.mxchange.org Git - friendica.git/commitdiff
fallback dbesc() when db is not there
authorFriendika <info@friendika.com>
Mon, 10 Jan 2011 21:57:59 +0000 (13:57 -0800)
committerFriendika <info@friendika.com>
Mon, 10 Jan 2011 21:57:59 +0000 (13:57 -0800)
include/dba.php

index ae3a4957b6b08ec95b69b93459c9cde6f0f88709..98823df3ae06563fe9e5288f064adf89a2bae896 100644 (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));
 }}