so I'm trying to update this add-on but I need a little help getting the admin page registration working but possibly more importantly this error sorted out to make sure it'll all be worth it:
[07-Jan-2018 01:27:35 America/New_York] Request URI: /spelL-MUd-shoRe/qbi_config.php, IP address: 73.52.227.139
#1 mysqli_real_escape_string() called at [/home/content/62/5902262/html/MY_ADMIN/includes/functions/qbi_functions.php:152]
#2 mysql_escape_string_array()
#3 array_walk() called at [/home/content/62/5902262/html/MY_ADMIN/includes/classes/qbi_classes.php:2610]
#4 Proc_form->proc_cleanData() called at [/home/content/62/5902262/html/MY_ADMIN/qbi_config.php:30]
[08-Jan-2018 15:36:37 America/New_York] PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, string given in /home/content/62/5902262/html/MY_ADMIN/includes/functions/qbi_functions.php on line 154
here's the guilty function:
function mysql_escape_string_array(&$var, $db) {
if (is_array($var)) {
array_walk($var,'mysql_escape_string_array', $db);
} else {
$var=mysqli_real_escape_string($db,$var); // This function is deprecated. PHP>=4.3.0 may use mysql_real_escape_string
}
return $var;
}
if I switch it to mysql_real_escape_string( and swap the order of the parameters as needed) it php errors about $db not being a resource.
I don't quite understand constructors or classes at this point in my programming experience but this qbi_mysql.php file contains this:
function & query($sql) {
$this->dbConn = mysqli_connect($this->host, $this->dbUser, $this->dbPass, $this->dbName);
if (!$queryResource=mysqli_query($this->dbConn,$sql)) {
trigger_error ('Query failed: '.mysqli_error($this->dbConn).' SQL: '.$sql);
}
return new MySQLResult($this,$queryResource);
}
}
which might help someone suggest a solution possibly?