mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-21 02:30:58 +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();
|
$arg_list = func_get_args();
|
||||||
$ret = [];
|
$ret = [];
|
||||||
|
|
||||||
for ($i = 0; $i < $numargs; $i++) {
|
for ($i = 0; $i < $numargs; $i++) {
|
||||||
if (is_string($arg_list[$i])) {
|
if (is_array($arg_list[$i])) {
|
||||||
$arg_list[$i] = stripslashes($arg_list[$i]);
|
// array handling
|
||||||
$res[] = mysqli_real_escape_string($this->dblink, $arg_list[$i]);
|
$escaped_array = [];
|
||||||
} else {
|
foreach ($arg_list[$i] as $item) {
|
||||||
$res[] = $arg_list[$i];
|
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;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user