diff options
author | stilez <stilez@users.noreply.github.com> | 2015-07-22 21:50:45 +0100 |
---|---|---|
committer | stilez <stilez@users.noreply.github.com> | 2015-07-22 21:50:45 +0100 |
commit | f812b8835400074fd2937ac87a54d5557543c656 (patch) | |
tree | 9abbdea97e8ecc4912b8032779994ae0b11746a6 | |
parent | 2b1f6ed24bc79954b27eaf69d3c5c78aa5b3472b (diff) | |
download | pfsense-f812b8835400074fd2937ac87a54d5557543c656.zip pfsense-f812b8835400074fd2937ac87a54d5557543c656.tar.gz |
removed $output (on review not really needed)
the only use for $output is as a temp variable to hold the imploded array, which is used in the following sprint and never referenced again. As it's simple code I will just merge the implode expression to the next line as a simpler "fix".
-rw-r--r-- | etc/inc/util.inc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 4e7d2bb..0127282 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -1444,9 +1444,8 @@ function mwexec($command, $nologentry = false, $clearsigmask = false, $backgroun // run in foreground, and (optionally) log if nonzero return $outputarray = array(); exec("$command 2>&1", $outputarray, $retval); - $output = implode(" ", $outputarray); if (($retval <> 0) && (!$nologentry || isset($config['system']['developerspew']))) - log_error(sprintf(gettext("The command '%1\$s' returned exit code '%2\$d', the output was '%3\$s' "), $command, $retval, $output)); + log_error(sprintf(gettext("The command '%1\$s' returned exit code '%2\$d', the output was '%3\$s' "), $command, $retval, implode(" ", $outputarray))); } if ($clearsigmask) { |