mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-11 23:26:08 +00:00
fix: alliance cannot be created
This only happens on newer MySQL versions where column type vs inserted type are being checked (so we cannot insert empty string into an int column, even if that column has a default value). Fixes #249
This commit is contained in:
@@ -1777,7 +1777,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
function createAlliance($tag, $name, $uid, $max) {
|
||||
list($tag, $name, $uid, $max) = $this->escape_input($tag, $name, (int) $uid, (int) $max);
|
||||
|
||||
$q = "INSERT into " . TB_PREFIX . "alidata values (0,'$name','$tag',$uid,0,0,0,'','',$max,'','','','','','','','','')";
|
||||
$q = "INSERT into " . TB_PREFIX . "alidata values (0,'$name','$tag',$uid,0,0,0,'','',$max,0,0,0,0,0,0,0,0,0)";
|
||||
mysqli_query($this->dblink,$q);
|
||||
return mysqli_insert_id($this->dblink);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user