summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2015-07-22 21:50:45 +0100
committerstilez <stilez@users.noreply.github.com>2015-07-22 21:50:45 +0100
commitf812b8835400074fd2937ac87a54d5557543c656 (patch)
tree9abbdea97e8ecc4912b8032779994ae0b11746a6
parent2b1f6ed24bc79954b27eaf69d3c5c78aa5b3472b (diff)
downloadpfsense-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.inc3
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) {
OpenPOWER on IntegriCloud