Skip to content

Commit 20a6092

Browse files
committed
Used file() instead of file_get_contents() and explode().
1 parent 8414f38 commit 20a6092

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

interface/web/login/index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ function is_admin_ip_whitelisted($ip, $conf)
182182
// if the file doesn't exist, we assume that webmaster doesn't use this feature
183183
if (!file_exists($conf['admin_ip_whitelist_file'])) return true;
184184

185-
$file_content = file_get_contents($conf['admin_ip_whitelist_file']);
186-
$file_lines = explode("\n", $file_content);
185+
$file_lines = file($conf['admin_ip_whitelist_file']);
187186

188187
$matches = array_filter($file_lines, function($v) use ($ip) {
189188
$line = trim($v);

0 commit comments

Comments
 (0)