mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
fix the other #defcon spam issue.
(/newthread.php #3) MySQL error: SQL syntax error near '' at line 1 $id is expected to be an int at all times by a lot of the code. May as well ensure it is. (Also, explicit check for === filter_int's failure condition, because 0 is still false.)
This commit is contained in:
parent
4573b59016
commit
3f5b4145b9
@ -7,8 +7,11 @@
|
|||||||
|
|
||||||
// Awful old legacy thing. Too much code relies on register globals,
|
// Awful old legacy thing. Too much code relies on register globals,
|
||||||
// and doesn't distinguish between _GET and _POST, so we have to do it here. fun
|
// and doesn't distinguish between _GET and _POST, so we have to do it here. fun
|
||||||
$id = filter_int($_POST['id']) ? $_POST['id'] : filter_int($_GET['id']);
|
$id = filter_int($_POST['id']);
|
||||||
|
if ($id === null)
|
||||||
|
$id = filter_int($_GET['id']);
|
||||||
|
if ($id === null)
|
||||||
|
$id = 0;
|
||||||
|
|
||||||
// Wait for the midnight backup to finish...
|
// Wait for the midnight backup to finish...
|
||||||
if ((int)date("Gi") < 5) {
|
if ((int)date("Gi") < 5) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user