Do not try to access non-existen string index.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
3b9d91f186
commit
91887c0185
|
@ -55,8 +55,10 @@ class Base32 {
|
||||||
if(!in_array($input[$i], Base32::$map))
|
if(!in_array($input[$i], Base32::$map))
|
||||||
return '';
|
return '';
|
||||||
for(int $j = 0; $j < 8; $j++) {
|
for(int $j = 0; $j < 8; $j++) {
|
||||||
if(array_key_exists($input[$i + $j], Base32::$flippedMap)) {
|
if($i + $j < strlen($input)) {
|
||||||
$x += str_pad(base_convert(Base32::$flippedMap[$input[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
|
if(array_key_exists($input[$i + $j], Base32::$flippedMap)) {
|
||||||
|
$x += str_pad(base_convert(Base32::$flippedMap[$input[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string[] $eightBits = str_split($x, 8);
|
string[] $eightBits = str_split($x, 8);
|
||||||
|
|
Loading…
Reference in New Issue