summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2019-02-26 10:28:15 +1000
committerBenjamin Southall <applemansigloo@gmail.com>2019-02-26 10:28:15 +1000
commitdce8a6e1ec82b876d217418672f16e5765f66c43 (patch)
tree11937abe340048b3bab91f4122dbbdf1f937ce8a
parent8c0f0b0a40fab4d9b1307a24b79d2717b4125810 (diff)
Casting to make bans work with newer PHP, as per vichan
-rw-r--r--inc/bans.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/inc/bans.php b/inc/bans.php
index 7a514f04..81e38006 100644
--- a/inc/bans.php
+++ b/inc/bans.php
@@ -47,31 +47,31 @@ class Bans {
if (isset($matches[2])) {
// Years
- $expire += $matches[2]*60*60*24*365;
+ $expire += (int)$matches[2]*60*60*24*365;
}
if (isset($matches[4])) {
// Months
- $expire += $matches[4]*60*60*24*30;
+ $expire += (int)$matches[4]*60*60*24*30;
}
if (isset($matches[6])) {
// Weeks
- $expire += $matches[6]*60*60*24*7;
+ $expire += (int)$matches[6]*60*60*24*7;
}
if (isset($matches[8])) {
// Days
- $expire += $matches[8]*60*60*24;
+ $expire += (int)$matches[8]*60*60*24;
}
if (isset($matches[10])) {
// Hours
- $expire += $matches[10]*60*60;
+ $expire += (int)$matches[10]*60*60;
}
if (isset($matches[12])) {
// Minutes
- $expire += $matches[12]*60;
+ $expire += (int)$matches[12]*60;
}
if (isset($matches[14])) {
// Seconds
- $expire += $matches[14];
+ $expire += (int)$matches[14];
}
return time() + $expire;