summaryrefslogtreecommitdiff
path: root/adodb-csvlib.inc.php
diff options
context:
space:
mode:
authorDamien Regad <dregad@mantisbt.org>2021-01-25 00:29:23 +0100
committerDamien Regad <dregad@mantisbt.org>2021-01-25 00:29:23 +0100
commit6d29339494fd418dc5c857a42bf816fb4acfb9f6 (patch)
tree5d08c831d07d3cf803f597d8443ab9e8ebf9cf0e /adodb-csvlib.inc.php
parentc3eb0b37cdb95a1be2e5932ada6be778ecf4f229 (diff)
downloadadodb-6d29339494fd418dc5c857a42bf816fb4acfb9f6.tar.gz
adodb-6d29339494fd418dc5c857a42bf816fb4acfb9f6.tar.bz2
adodb-6d29339494fd418dc5c857a42bf816fb4acfb9f6.zip
Fix remaining usages of get_magic_* functions
Follow-up on #657, applies the same logic to remaining usages. This code will be removed in ADOdb 5.21.0. Fixes #619
Diffstat (limited to 'adodb-csvlib.inc.php')
-rw-r--r--adodb-csvlib.inc.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/adodb-csvlib.inc.php b/adodb-csvlib.inc.php
index 91ec5cf3..4d8c6af6 100644
--- a/adodb-csvlib.inc.php
+++ b/adodb-csvlib.inc.php
@@ -248,7 +248,13 @@ $ADODB_INCLUDED_CSV = 1;
//var_dump($arr);
if (!is_array($arr)) {
$err = "Recordset had unexpected EOF (in serialized recordset)";
- if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!";
+ // PHP7.4 spits deprecated notice, PHP8 removed magic_* stuff
+ if (version_compare(PHP_VERSION, '7.4.0', '<')
+ && function_exists('get_magic_quotes_runtime')
+ && get_magic_quotes_runtime()
+ ) {
+ $err .= ". Magic Quotes Runtime should be disabled!";
+ }
return $false;
}
$rs = new $rsclass();