diff options
author | Joost de Valk <joost@yoast.com> | 2016-06-26 14:40:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-26 14:40:58 +0200 |
commit | b243072b42b0ca38ceeb6342e25cb42117296ae0 (patch) | |
tree | df275dcdb76c4e313fb3adaea0a6548c4cb92e59 | |
parent | 091bb9a917d9c94439e3e27a65ac33eee5bfefb5 (diff) | |
download | random_compat-b243072b42b0ca38ceeb6342e25cb42117296ae0.zip random_compat-b243072b42b0ca38ceeb6342e25cb42117296ae0.tar.gz random_compat-b243072b42b0ca38ceeb6342e25cb42117296ae0.tar.bz2 |
explicitly cast values to int
This is needed because, per [this PHP RFC](https://wiki.php.net/rfc/invalid_strings_in_arithmetic), PHP 7.1 will throw errors when not explicitly casted numeric values are used in arithmetic.
-rw-r--r-- | lib/random.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/random.php b/lib/random.php index a880259..3175a9c 100644 --- a/lib/random.php +++ b/lib/random.php @@ -34,9 +34,9 @@ if (!defined('PHP_VERSION_ID')) { $RandomCompatversion = explode('.', PHP_VERSION); define( 'PHP_VERSION_ID', - $RandomCompatversion[0] * 10000 - + $RandomCompatversion[1] * 100 - + $RandomCompatversion[2] + (int) $RandomCompatversion[0] * 10000 + + (int) $RandomCompatversion[1] * 100 + + (int) $RandomCompatversion[2] ); $RandomCompatversion = null; } |