File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 22
22
*/
23
23
class DomainName extends Type
24
24
{
25
- const FLAG_NO_COMPRESSION = 0x80000000 ;
25
+ const FLAG_NO_COMPRESSION = \ PHP_INT_SIZE === 4 ? - 2147483648 : 0x80000000 ;
26
26
27
27
/**
28
28
* @var string
Original file line number Diff line number Diff line change @@ -38,10 +38,12 @@ public function setValue($value)
38
38
{
39
39
$ value = (int )$ value ;
40
40
41
- if ($ value < 0 ) {
42
- throw new \UnderflowException ('Long integer value must be in the range 0 - 4294967296 ' );
43
- } else if ($ value > 0xffffffff ) {
44
- throw new \OverflowException ('Long integer value must be in the range 0 - 4294967296 ' );
41
+ if (\PHP_INT_SIZE > 4 ) {
42
+ if ($ value < 0 ) {
43
+ throw new \UnderflowException ('Long integer value must be in the range 0 - 4294967296 ' );
44
+ } else if ($ value > 0xffffffff ) {
45
+ throw new \OverflowException ('Long integer value must be in the range 0 - 4294967296 ' );
46
+ }
45
47
}
46
48
47
49
$ this ->value = $ value ;
You can’t perform that action at this time.
0 commit comments