diff --git a/src/AlphaID.php b/src/AlphaID.php index 12c8bc5..d8889d0 100644 --- a/src/AlphaID.php +++ b/src/AlphaID.php @@ -5,6 +5,7 @@ use Luffy\Exception\DecodeException; use Luffy\Exception\InvalidArgumentException; +#[\AllowDynamicProperties] class AlphaID { const MIN_ALPHABET_LENGTH = 16; @@ -216,7 +217,7 @@ private function _encode(array $numbers) $excess = strlen($ret) - $this->_min_hash_length; if ($excess > 0) { - $ret = substr($ret, $excess / 2, $this->_min_hash_length); + $ret = substr($ret, (int)($excess / 2), $this->_min_hash_length); } }