Skip to content

Commit e6ef70c

Browse files
committed
fix: [ErrorException] Undefined array key
If a setting does not exists, ini_get_all() does not have the key.
1 parent a4aae91 commit e6ef70c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

system/Security/CheckPhpIni.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ public static function checkIni(): array
142142

143143
foreach ($items as $key => $values) {
144144
$output[$key] = [
145-
'global' => $ini[$key]['global_value'],
146-
'current' => $ini[$key]['local_value'],
145+
'global' => array_key_exists($key, $ini) ? $ini[$key]['global_value'] : 'disabled',
146+
'current' => array_key_exists($key, $ini) ? $ini[$key]['local_value'] : 'disabled',
147147
'recommended' => $values['recommended'] ?? '',
148148
'remark' => $values['remark'] ?? '',
149149
];

0 commit comments

Comments
 (0)