]> granicus.if.org Git - php/commitdiff
Fixed proc_open's reference argument
authorXinchen Hui <laruence@gmail.com>
Mon, 3 Mar 2014 08:50:35 +0000 (16:50 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 3 Mar 2014 08:50:35 +0000 (16:50 +0800)
ext/standard/proc_open.c

index 18638ddad8a090cb163f816dade6191f9dfc8ae6..2728cc3a6ecfa4f40ec1a2bb8e6fc6b3956e1597 100644 (file)
@@ -897,8 +897,11 @@ PHP_FUNCTION(proc_open)
        proc->env = env;
 
        if (pipes != NULL) {
+               ZEND_ASSERT(Z_ISREF_P(pipes));
+               pipes = Z_REFVAL_P(pipes);
                zval_dtor(pipes);
-       }
+       } 
+
        array_init(pipes);
 
 #if PHP_CAN_DO_PTS