mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-24 00:42:43 +00:00
Fix column selection issue
This commit is contained in:
parent
2d519f6396
commit
1eba03cc29
@ -137,10 +137,13 @@ class Page {
|
|||||||
// Under certain versions of PHP, there is a bug with BIT columns.
|
// Under certain versions of PHP, there is a bug with BIT columns.
|
||||||
// An empty string is returned no matter what the value is.
|
// An empty string is returned no matter what the value is.
|
||||||
// Workaround: cast to unsigned.
|
// Workaround: cast to unsigned.
|
||||||
$selection = "id,uuid,reason,banned_by_name,banned_by_uuid,removed_by_name,time,until,CAST(active AS UNSIGNED) AS active";
|
$selection = "id,uuid,reason,banned_by_name,banned_by_uuid,time,until,CAST(active AS UNSIGNED) AS active";
|
||||||
if ($table === $this->settings->table['warnings']) {
|
if ($table === $this->settings->table['warnings']) {
|
||||||
$selection .= ",CAST(warned AS UNSIGNED) AS warned";
|
$selection .= ",CAST(warned AS UNSIGNED) AS warned";
|
||||||
}
|
}
|
||||||
|
if ($table !== $this->settings->table['kicks']) {
|
||||||
|
$selection .= "removed_by_name";
|
||||||
|
}
|
||||||
return $selection;
|
return $selection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user