Skip to content

Commit 4a09bdb

Browse files
committed
int conversion warning in PHP8.5
#477
1 parent 368bcdc commit 4a09bdb

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

getid3/getid3.lib.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,7 @@ public static function CastAsInt($floatnum) {
113113
* @return bool
114114
*/
115115
public static function intValueSupported($num) {
116-
// check if integers are 64-bit
117-
static $hasINT64 = null;
118-
if ($hasINT64 === null) { // 10x faster than is_null()
119-
/** @var int|float|object $bigInt */
120-
$bigInt = pow(2, 31);
121-
$hasINT64 = is_int($bigInt); // 32-bit int are limited to (2^31)-1
122-
if (!$hasINT64 && !defined('PHP_INT_MIN')) {
123-
define('PHP_INT_MIN', ~PHP_INT_MAX);
124-
}
125-
}
126-
// if integers are 64-bit - no other check required
127-
if ($hasINT64 || (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN))) {
128-
return true;
129-
}
130-
return false;
116+
return (($num <= PHP_INT_MAX) && ($num >= PHP_INT_MIN));
131117
}
132118

133119
/**

getid3/getid3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class getID3
387387
*/
388388
protected $startup_warning = '';
389389

390-
const VERSION = '1.9.24-202511301120';
390+
const VERSION = '1.9.24-202512160912';
391391
const FREAD_BUFFER_SIZE = 32768;
392392

393393
const ATTACHMENTS_NONE = false;

0 commit comments

Comments
 (0)