Skip to content

Commit

Permalink
Merge pull request #8804 from kenjis/fix-phpini-check-Undefined-array…
Browse files Browse the repository at this point in the history
…-key

fix: [ErrorException] Undefined array key in `spark phpini:check`
  • Loading branch information
kenjis authored Apr 21, 2024
2 parents 6934848 + 8d51433 commit 971b0da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions system/Security/CheckPhpIni.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,10 @@ public static function checkIni(): array
$ini = ini_get_all();

foreach ($items as $key => $values) {
$hasKeyInIni = array_key_exists($key, $ini);
$output[$key] = [
'global' => $ini[$key]['global_value'],
'current' => $ini[$key]['local_value'],
'global' => $hasKeyInIni ? $ini[$key]['global_value'] : 'disabled',
'current' => $hasKeyInIni ? $ini[$key]['local_value'] : 'disabled',
'recommended' => $values['recommended'] ?? '',
'remark' => $values['remark'] ?? '',
];
Expand Down

0 comments on commit 971b0da

Please sign in to comment.