* (bug 10763) Fix multi-insert logic for PostgreSQL
* Fix invalid XHTML when viewing a deleted revision
* Fix syntax error in translations of magic words in Romanian language
+* (bug 8737) Fix warnings caused by incorrect use of `/dev/null` when piping
+ process error output under Windows
== API changes since 1.10 ==
$command = "7za a -bd -si " . wfEscapeShellArg( $file );
// Suppress annoying useless crap from p7zip
// Unfortunately this could suppress real error messages too
- $command .= " >/dev/null 2>&1";
+ $command .= ' ' . wfGetNull() . ' 2>&1';
parent::DumpPipeOutput( $command );
}
}
}
}
-
+/**
+ * Get a platform-independent path to the null file, e.g.
+ * /dev/null
+ *
+ * @return string
+ */
+function wfGetNull() {
+ return wfIsWindows()
+ ? 'NUL'
+ : '/dev/null';
+}
\ No newline at end of file
$descriptorspec = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
- 2 => array('file', '/dev/null', 'a') // FIXME: this line in UNIX-specific, it generates a warning on Windows, because /dev/null is not a valid Windows file.
+ 2 => array('file', wfGetNull(), 'a')
);
$pipes = array();
$process = proc_open("$wgTidyBin -config $wgTidyConf $wgTidyOpts$opts", $descriptorspec, $pipes);