Skip to content

Commit

Permalink
Merge pull request #9026 from kenjis/fix-spark-phpini-check-TypeError
Browse files Browse the repository at this point in the history
fix: `spark phpini:check` may cause TypeError
  • Loading branch information
kenjis authored Jul 8, 2024
2 parents c23375b + 847ee23 commit 517aa33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/Security/CheckPhpIni.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ public static function run(bool $isCli = true)
private static function outputForCli(array $output, array $thead, array $tbody): void
{
foreach ($output as $directive => $values) {
$current = $values['current'];
$current = $values['current'] ?? '';
$notRecommended = false;

if ($values['recommended'] !== '') {
if ($values['recommended'] !== $values['current']) {
if ($values['recommended'] !== $current) {
$notRecommended = true;
}

$current = $notRecommended
? CLI::color($values['current'] === '' ? 'n/a' : $values['current'], 'red')
: $values['current'];
? CLI::color($current === '' ? 'n/a' : $current, 'red')
: $current;
}

$directive = $notRecommended ? CLI::color($directive, 'red') : $directive;
Expand Down

0 comments on commit 517aa33

Please sign in to comment.