* Use additional is_array checking

* Full path to cat
This commit is contained in:
Scott Ullrich 2005-03-03 00:07:44 +00:00
parent 833f94fc8a
commit ceff171744

View File

@ -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 */