File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -869,8 +869,7 @@ PHP_FUNCTION(proc_open)
869
869
}
870
870
} else if (strcmp (Z_STRVAL_P (ztype ), "redirect" ) == 0 ) {
871
871
zval * ztarget = zend_hash_index_find_deref (Z_ARRVAL_P (descitem ), 1 );
872
- struct php_proc_open_descriptor_item * target = NULL ;
873
- php_file_descriptor_t childend ;
872
+ php_file_descriptor_t childend = -1 ;
874
873
875
874
if (!ztarget ) {
876
875
zend_value_error ("Missing redirection target" );
@@ -883,13 +882,12 @@ PHP_FUNCTION(proc_open)
883
882
884
883
for (i = 0 ; i < ndesc ; i ++ ) {
885
884
if (descriptors [i ].index == Z_LVAL_P (ztarget )) {
886
- target = & descriptors [i ];
885
+ childend = descriptors [i ]. childend ;
887
886
break ;
888
887
}
889
888
}
890
- if (target ) {
891
- childend = target -> childend ;
892
- } else {
889
+
890
+ if (childend == -1 ) {
893
891
if (Z_LVAL_P (ztarget ) < 0 || Z_LVAL_P (ztarget ) > 2 ) {
894
892
php_error_docref (NULL , E_WARNING ,
895
893
"Redirection target " ZEND_LONG_FMT " not found" , Z_LVAL_P (ztarget ));
You can’t perform that action at this time.
0 commit comments