]> granicus.if.org Git - php/commitdiff
Fixed bug #9041 and others in the same class (patch by pete.lee@ubs.com)
authorEdin Kadribasic <edink@php.net>
Sun, 20 Jan 2002 23:58:37 +0000 (23:58 +0000)
committerEdin Kadribasic <edink@php.net>
Sun, 20 Jan 2002 23:58:37 +0000 (23:58 +0000)
sapi/cgi/cgi_main.c

index 1226d1108da612694c93bf1c5993f66726a16ad3..e2a1d96cf976e73b412eb35874e1b425681232df 100644 (file)
@@ -740,7 +740,9 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
                        }
                        file_handle.filename = argv0;
                        file_handle.opened_path = expand_filepath(argv0, NULL TSRMLS_CC);
-               } else if (retval == SUCCESS) {
+               }
+
+               if (file_handle.handle.fp && (file_handle.handle.fp != stdin)) {
                        /* #!php support */
                        c = fgetc(file_handle.handle.fp);
                        if (c == '#') {