mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 02:14:45 +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);
|
if (strstr($argHostname,':')) list($argHostname,$this->port) = explode(':',$argHostname);
|
||||||
$ok = mysqli_real_connect($this->_connectionID,
|
$ok = @mysqli_real_connect($this->_connectionID,
|
||||||
$argHostname,
|
$argHostname,
|
||||||
$argUsername,
|
$argUsername,
|
||||||
$argPassword,
|
$argPassword,
|
||||||
@ -176,7 +176,7 @@ class ADODB_mysqli extends ADOConnection {
|
|||||||
function qstr($s, $magic_quotes = false)
|
function qstr($s, $magic_quotes = false)
|
||||||
{
|
{
|
||||||
if (!$magic_quotes) {
|
if (!$magic_quotes) {
|
||||||
if (PHP_VERSION >= 5)
|
if (PHP_VERSION >= 5 && $this->_connectionID)
|
||||||
return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'";
|
return "'" . mysqli_real_escape_string($this->_connectionID, $s) . "'";
|
||||||
|
|
||||||
if ($this->replaceQuote[0] == '\\')
|
if ($this->replaceQuote[0] == '\\')
|
||||||
|
Loading…
Reference in New Issue
Block a user