-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error for videos #155
Comments
public static function BigEndian2Int($byteword, $synchsafe=false, $signed=false) {
$intvalue = 0;
$bytewordlen = strlen($byteword);
if ($bytewordlen == 0) {
return false;
}
for ($i = 0; $i < $bytewordlen; $i++) {
if ($synchsafe) { // disregard MSB, effectively 7-bit bytes
//$intvalue = $intvalue | (ord($byteword{$i}) & 0x7F) << (($bytewordlen - 1 - $i) * 7); // faster, but runs into problems past 2^31 on 32-bit systems
$intvalue += (ord($byteword{$i}) & 0x7F) * pow(2, ($bytewordlen - 1 - $i) * 7);
} else {
$intvalue += ord($byteword{$i}) * pow(256, ($bytewordlen - 1 - $i));
}
}
if ($signed && !$synchsafe) {
// synchsafe ints are not allowed to be signed
if ($bytewordlen <= PHP_INT_SIZE) {
$signMaskBit = 0x80 << (8 * ($bytewordlen - 1));
if ($intvalue & $signMaskBit) {
$intvalue = 0 - ($intvalue & ($signMaskBit - 1));
}
} else {
throw new Exception('ERROR: Cannot have signed integers larger than '.(8 * PHP_INT_SIZE).'-bits ('.strlen($byteword).') in self::BigEndian2Int()');
//break; // LINE 285 IS THIS LINE HERE
}
}
return self::CastAsInt($intvalue);
} I found the place where the error is supposed to have occured. Commenting it out or changing the |
Looks like there is a similar issue in JPlayer: d-matt/piwigo-jplayer#14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fatal error: 'break' not in the 'loop' or 'switch' context in .../plugins/piwigo-jplayer/include/getid3/getid3.lib.php on line 285
Has this to do with upgrade to PHP 7?
The text was updated successfully, but these errors were encountered: