mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
- quietent a warning if the connecting database does not exist
- cant use mysqli_real_escape_string without DB-connection, falling back to default quoting
This commit is contained in:
parent
c23bc572be
commit
35a77b3c36
@ -86,7 +86,7 @@ class ADODB_mysqli extends ADOConnection {
|
||||
}
|
||||
|
||||
if (strstr($argHostname,':')) list($argHostname,$this->port) = explode(':',$argHostname);
|
||||
$ok = mysqli_real_connect($this->_connectionID,
|
||||
$ok = @mysqli_real_connect($this->_connectionID,
|
||||
$argHostname,
|
||||
$argUsername,
|
||||
$argPassword,
|
||||
@ -176,7 +176,7 @@ class ADODB_mysqli extends ADOConnection {
|
||||
function qstr($s, $magic_quotes = false)
|
||||
{
|
||||
if (!$magic_quotes) {
|
||||
if (PHP_VERSION >= 5)
|
||||
if (PHP_VERSION >= 5 && $this->_connectionID)
|
||||
return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'";
|
||||
|
||||
if ($this->replaceQuote[0] == '\\')
|
||||
|
Loading…
Reference in New Issue
Block a user