Skip to content

Commit

Permalink
Builds: Fix deprecated function usage
Browse files Browse the repository at this point in the history
Since PHP 8.0, passing null to strlen is deprecated
  • Loading branch information
AniLeo committed Sep 7, 2024
1 parent f9c4461 commit d76d45a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/class.Builds.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public static function printTable() : void
foreach ($builds as $build)
{
// Padding formula to apply in order to align deletions in all rows
$padding = (7 - strlen($build->additions)) * 7;
$length = !is_null($build->additions) ? strlen($build->additions) : 1;
$padding = (7 - $length) * 7;

// Formatted version with metadata
$version = "";
Expand Down

0 comments on commit d76d45a

Please sign in to comment.