[ticket/10020] Replaced (int) 0x80000000 with portable equivalent.

PHPBB3-10020
This commit is contained in:
Oleg Pudeyev 2011-02-01 21:50:44 -05:00 committed by Andreas Fischer
parent b414a4d107
commit 15992ceff9

View file

@ -573,7 +573,8 @@ function validate_range($value_ary, &$error)
'BOOL' => array('php_type' => 'int', 'min' => 0, 'max' => 1),
'USINT' => array('php_type' => 'int', 'min' => 0, 'max' => 65535),
'UINT' => array('php_type' => 'int', 'min' => 0, 'max' => (int) 0x7fffffff),
'INT' => array('php_type' => 'int', 'min' => (int) 0x80000000, 'max' => (int) 0x7fffffff),
// Do not use (int) 0x80000000 - it evaluates to different values on 32-bit and 64-bit systems.
'INT' => array('php_type' => 'int', 'min' => -2147483648, 'max' => (int) 0x7fffffff),
'TINT' => array('php_type' => 'int', 'min' => -128, 'max' => 127),
'VCHAR' => array('php_type' => 'string', 'min' => 0, 'max' => 255),