tony2001                Thu Feb 22 10:06:02 2007 UTC

  Modified files:              
    /php-src/sapi/cli   php_cli.c 
  Log:
  check for NULL, then add flag
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.169&r2=1.170&diff_format=u
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.169 php-src/sapi/cli/php_cli.c:1.170
--- php-src/sapi/cli/php_cli.c:1.169    Wed Feb 21 21:56:45 2007
+++ php-src/sapi/cli/php_cli.c  Thu Feb 22 10:06:02 2007
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_cli.c,v 1.169 2007/02/21 21:56:45 tony2001 Exp $ */
+/* $Id: php_cli.c,v 1.170 2007/02/22 10:06:02 tony2001 Exp $ */
 
 #include "php.h"
 #include "php_globals.h"
@@ -487,12 +487,6 @@
        s_out = php_stream_open_wrapper_ex("php://stdout", "wb", 0, NULL, 
sc_out);
        s_err = php_stream_open_wrapper_ex("php://stderr", "wb", 0, NULL, 
sc_err);
 
-#if PHP_DEBUG
-       /* do not close stdout and stderr */
-       s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE;
-       s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE;
-#endif
-
        if (s_in==NULL || s_out==NULL || s_err==NULL) {
                FREE_ZVAL(zin);
                FREE_ZVAL(zout);
@@ -502,7 +496,13 @@
                if (s_err) php_stream_close(s_err);
                return;
        }
-       
+
+#if PHP_DEBUG
+       /* do not close stdout and stderr */
+       s_out->flags |= PHP_STREAM_FLAG_NO_CLOSE;
+       s_err->flags |= PHP_STREAM_FLAG_NO_CLOSE;
+#endif
+
        s_in_process = s_in;
 
        php_stream_to_zval(s_in,  zin);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to