Error outputs were piped to a temporary buffer that wasn’t read by
anyone, making debugging hard because errors were completely silenced.
By not explicitly redirecting stderr on proc_open, the subprocess
inherits its parent stderr.
---
 web/lib/acctfuncs.inc.php    | 2 --
 web/lib/pkgbasefuncs.inc.php | 2 --
 2 files changed, 4 deletions(-)

diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index d238c0e0..ebabb840 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -1349,7 +1349,6 @@ function notify($params) {
        $descspec = array(
                0 => array('pipe', 'r'),
                1 => array('pipe', 'w'),
-               2 => array('pipe', 'w')
        );
 
        $p = proc_open($cmd, $descspec, $pipes);
@@ -1360,7 +1359,6 @@ function notify($params) {
 
        fclose($pipes[0]);
        fclose($pipes[1]);
-       fclose($pipes[2]);
 
        return proc_close($p);
 }
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index a4925891..22b882b4 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -96,7 +96,6 @@ function render_comment($id) {
        $descspec = array(
                0 => array('pipe', 'r'),
                1 => array('pipe', 'w'),
-               2 => array('pipe', 'w')
        );
 
        $p = proc_open($cmd, $descspec, $pipes);
@@ -107,7 +106,6 @@ function render_comment($id) {
 
        fclose($pipes[0]);
        fclose($pipes[1]);
-       fclose($pipes[2]);
 
        return proc_close($p);
 }
-- 
2.27.0

Reply via email to