Skip to content

Commit 3f8b220

Browse files
committed
Adding a guard
Signed-off-by: iifawzi <iifawzie@gmail.com>
1 parent 122fe61 commit 3f8b220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tools/ContextGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public static function formatName($name)
312312

313313
$version = array_map('intval', str_split($versionString, 2));
314314
/* Remove trailing zero */
315-
if ($version[count($version) - 1] === 0) {
315+
if (count($version) > 0 && $version[count($version) - 1] === 0) {
316316
$version = array_slice($version, 0, count($version) - 1);
317317
}
318318

0 commit comments

Comments
 (0)