mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fix for warnings/notices/deprecated messages on PHP 7.4
This commit is contained in:
@@ -252,7 +252,6 @@ $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!";
|
||||
return $false;
|
||||
}
|
||||
$rs = new $rsclass();
|
||||
|
||||
@@ -691,12 +691,6 @@ Committed_AS: 348732 kB
|
||||
}
|
||||
$this->conn->LogSQL($savelog);
|
||||
|
||||
// magic quotes
|
||||
|
||||
if (isset($_GET['sql']) && get_magic_quotes_gpc()) {
|
||||
$_GET['sql'] = $_GET['sql'] = str_replace(array("\\'",'\"'),array("'",'"'),$_GET['sql']);
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['ADODB_PERF_SQL'])) $nsql = $_SESSION['ADODB_PERF_SQL'] = 10;
|
||||
else $nsql = $_SESSION['ADODB_PERF_SQL'];
|
||||
|
||||
@@ -999,12 +993,6 @@ Committed_AS: 348732 kB
|
||||
|
||||
function undomq($m)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) {
|
||||
// undo the damage
|
||||
$m = str_replace('\\\\','\\',$m);
|
||||
$m = str_replace('\"','"',$m);
|
||||
$m = str_replace('\\\'','\'',$m);
|
||||
}
|
||||
return $m;
|
||||
}
|
||||
|
||||
|
||||
@@ -1303,8 +1303,7 @@ class adoSchema {
|
||||
*/
|
||||
function __construct( $db ) {
|
||||
// Initialize the environment
|
||||
$this->mgq = get_magic_quotes_runtime();
|
||||
ini_set("magic_quotes_runtime", 0);
|
||||
$this->mgq = 0;
|
||||
#set_magic_quotes_runtime(0);
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
@@ -1407,9 +1407,8 @@ class adoSchema {
|
||||
*/
|
||||
function __construct( $db ) {
|
||||
// Initialize the environment
|
||||
$this->mgq = get_magic_quotes_runtime();
|
||||
$this->mgq = 0;
|
||||
#set_magic_quotes_runtime(0);
|
||||
ini_set("magic_quotes_runtime", 0);
|
||||
|
||||
$this->db = $db;
|
||||
$this->debug = $this->db->debug;
|
||||
|
||||
@@ -834,7 +834,7 @@ if (!defined('_ADODB_LAYER')) {
|
||||
* Requested by "Karsten Dambekalns" <k.dambekalns@fishfarm.de>
|
||||
*/
|
||||
function QMagic($s) {
|
||||
return $this->qstr($s,get_magic_quotes_gpc());
|
||||
return $this->qstr($s,0);
|
||||
}
|
||||
|
||||
function q(&$s) {
|
||||
@@ -2034,9 +2034,6 @@ if (!defined('_ADODB_LAYER')) {
|
||||
if (!$rs) {
|
||||
// no cached rs found
|
||||
if ($this->debug) {
|
||||
if (get_magic_quotes_runtime() && !$this->memCache) {
|
||||
ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :(");
|
||||
}
|
||||
if ($this->debug !== -1) {
|
||||
ADOConnection::outp( " $md5file cache failure: $err (this is a notice and not an error)");
|
||||
}
|
||||
@@ -2941,7 +2938,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
|
||||
* An example is $db->qstr("Don't bother",magic_quotes_runtime());
|
||||
*
|
||||
* @param s the string to quote
|
||||
* @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc().
|
||||
* @param [magic_quotes] if $s is GET/POST var, set to 0.
|
||||
* This undoes the stupidity of magic quotes for GPC.
|
||||
*
|
||||
* @return quoted string to be sent back to database
|
||||
|
||||
@@ -170,7 +170,7 @@ class ADODB_mssql extends ADOConnection {
|
||||
* An example is $db->qstr("Don't bother",magic_quotes_runtime());
|
||||
*
|
||||
* @param s the string to quote
|
||||
* @param [magic_quotes] if $s is GET/POST var, set to get_magic_quotes_gpc().
|
||||
* @param [magic_quotes] if $s is GET/POST var, set to 0.
|
||||
* This undoes the stupidity of magic quotes for GPC.
|
||||
*
|
||||
* @return quoted string to be sent back to database
|
||||
|
||||
@@ -226,10 +226,10 @@ class ADODB_mysqli extends ADOConnection {
|
||||
* @param string $s The string to quote
|
||||
* @param boolean $magic_quotes If false, use mysqli_real_escape_string()
|
||||
* if you are quoting a string extracted from a POST/GET variable,
|
||||
* then pass get_magic_quotes_gpc() as the second parameter. This will
|
||||
* then pass 0 as the second parameter. This will
|
||||
* ensure that the variable is not quoted twice, once by qstr() and
|
||||
* once by the magic_quotes_gpc.
|
||||
* Eg. $s = $db->qstr(_GET['name'],get_magic_quotes_gpc());
|
||||
* Eg. $s = $db->qstr(_GET['name'],0);
|
||||
* @return string Quoted string
|
||||
*/
|
||||
function qstr($s, $magic_quotes = false)
|
||||
|
||||
@@ -1495,7 +1495,7 @@ SELECT /*+ RULE */ distinct b.column_name
|
||||
* An example is $db->qstr("Don't bother",magic_quotes_runtime());
|
||||
*
|
||||
* @param string $s the string to quote
|
||||
* @param bool $magic_quotes if $s is GET/POST var, set to get_magic_quotes_gpc().
|
||||
* @param bool $magic_quotes if $s is GET/POST var, set to 0.
|
||||
* This undoes the stupidity of magic quotes for GPC.
|
||||
*
|
||||
* @return string quoted string to be sent back to database
|
||||
|
||||
@@ -54,13 +54,6 @@ function err($s)
|
||||
// undo stupid magic quotes
|
||||
function undomq(&$m)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) {
|
||||
// undo the damage
|
||||
$m = str_replace('\\\\','\\',$m);
|
||||
$m = str_replace('\"','"',$m);
|
||||
$m = str_replace('\\\'','\'',$m);
|
||||
|
||||
}
|
||||
return $m;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user