diff options
| author | Damien Regad <dregad@mantisbt.org> | 2021-01-25 00:32:12 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2021-01-25 00:32:12 +0100 |
| commit | 82e26bb5db3649641117749374a219201b86cbd9 (patch) | |
| tree | b00a19c9b4dc0e6f07de383f5fe21fc1d66ea481 /adodb.inc.php | |
| parent | 20a5a5fe1dcb5137545e52c306286972b3dd9f91 (diff) | |
| parent | 6d29339494fd418dc5c857a42bf816fb4acfb9f6 (diff) | |
| download | adodb-82e26bb5db3649641117749374a219201b86cbd9.tar.gz adodb-82e26bb5db3649641117749374a219201b86cbd9.tar.bz2 adodb-82e26bb5db3649641117749374a219201b86cbd9.zip | |
Merge branch 'hotfix/5.20' into release/5.21
# Conflicts:
# adodb.inc.php
Diffstat (limited to 'adodb.inc.php')
| -rw-r--r-- | adodb.inc.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/adodb.inc.php b/adodb.inc.php index 65b935c0..b3313692 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -897,9 +897,16 @@ if (!defined('_ADODB_LAYER')) { * Requested by "Karsten Dambekalns" <k.dambekalns@fishfarm.de> * * @return string + * @deprecated 5.20.20 */ function QMagic($s) { - return $this->qstr($s,get_magic_quotes_gpc()); + // magic quotes + // PHP7.4 spits deprecated notice, PHP8 removed magic_* stuff + $magic_quotes = version_compare(PHP_VERSION, '7.4.0', '<') + && function_exists('get_magic_quotes_gpc') + && get_magic_quotes_gpc(); + + return $this->qstr($s, $magic_quotes); } function q(&$s) { @@ -2219,7 +2226,12 @@ if (!defined('_ADODB_LAYER')) { if (!$rs) { // no cached rs found if ($this->debug) { - if (get_magic_quotes_runtime() && !$this->memCache) { + // PHP7.4 spits deprecated notice, PHP8 removed magic_* stuff + if (!$this->memCache + && version_compare(PHP_VERSION, '7.4.0', '<') + && function_exists('get_magic_quotes_runtime') + && get_magic_quotes_runtime() + ) { ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :("); } if ($this->debug !== -1) { |
