mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
* Use additional is_array checking
* Full path to cat
This commit is contained in:
parent
833f94fc8a
commit
ceff171744
@ -145,8 +145,9 @@ function filter_configure() {
|
||||
$rules_error = exec_command("/sbin/pfctl -f {$g['tmp_path']}/rules.debug");
|
||||
$line_error = split("\:", $rules_error);
|
||||
$line_number = $line_error[1];
|
||||
$line_split = split("\n", `cat /tmp/rules.debug`);
|
||||
$line_error = "The line in question reads: " . $line_split[$line_number];
|
||||
$line_split = split("\n", `/bin/cat /tmp/rules.debug`);
|
||||
if(is_array($line_split))
|
||||
$line_error = "The line in question reads: " . $line_split[$line_number];
|
||||
return "There was an error loading the rules.<p><pre>" . $rules_error . "\n" . $line_error . "</pre>";
|
||||
} else {
|
||||
/* process packager manager custom rules */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user