jani Wed, 09 Dec 2009 19:33:14 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=291927
Log: - Fix file() Changed paths: U php/php-src/trunk/ext/standard/file.c Modified: php/php-src/trunk/ext/standard/file.c =================================================================== --- php/php-src/trunk/ext/standard/file.c 2009-12-09 18:11:03 UTC (rev 291926) +++ php/php-src/trunk/ext/standard/file.c 2009-12-09 19:33:14 UTC (rev 291927) @@ -796,7 +796,6 @@ zend_bool use_include_path; zend_bool include_new_line; zend_bool skip_blank_lines; - zend_bool text_mode; php_stream *stream; zval *zcontext = NULL; php_stream_context *context = NULL; @@ -813,14 +812,13 @@ use_include_path = flags & PHP_FILE_USE_INCLUDE_PATH; include_new_line = !(flags & PHP_FILE_IGNORE_NEW_LINES); skip_blank_lines = flags & PHP_FILE_SKIP_EMPTY_LINES; - text_mode = !(flags & PHP_FILE_BINARY); context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); if (php_stream_path_param_encode(ppfilename, &filename, &filename_len, REPORT_ERRORS, context) == FAILURE) { RETURN_FALSE; } - stream = php_stream_open_wrapper_ex(filename, text_mode ? "rt" : "rb", (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context); + stream = php_stream_open_wrapper_ex(filename, (flags & PHP_FILE_TEXT) ? "rt" : "rb", (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context); if (!stream) { RETURN_FALSE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php