mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Update Database.php
Fix issue "Building orders are canceled after the attack in WW village"
This commit is contained in:
+20
-8
@@ -705,14 +705,26 @@ class MYSQLi_DB implements IDbConnection {
|
||||
$arg_list = func_get_args();
|
||||
$ret = [];
|
||||
|
||||
for ($i = 0; $i < $numargs; $i++) {
|
||||
if (is_string($arg_list[$i])) {
|
||||
$arg_list[$i] = stripslashes($arg_list[$i]);
|
||||
$res[] = mysqli_real_escape_string($this->dblink, $arg_list[$i]);
|
||||
} else {
|
||||
$res[] = $arg_list[$i];
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < $numargs; $i++) {
|
||||
if (is_array($arg_list[$i])) {
|
||||
// array handling
|
||||
$escaped_array = [];
|
||||
foreach ($arg_list[$i] as $item) {
|
||||
if (is_string($item)) {
|
||||
$item = stripslashes($item);
|
||||
$escaped_array[] = mysqli_real_escape_string($this->dblink, $item);
|
||||
} else {
|
||||
$escaped_array[] = (int)$item;
|
||||
}
|
||||
}
|
||||
$res[] = $escaped_array;
|
||||
} elseif (is_string($arg_list[$i])) {
|
||||
$arg_list[$i] = stripslashes($arg_list[$i]);
|
||||
$res[] = mysqli_real_escape_string($this->dblink, $arg_list[$i]);
|
||||
} else {
|
||||
$res[] = (int)$arg_list[$i];
|
||||
}
|
||||
}
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user