pajoye Thu Jun 14 19:56:35 2007 UTC Modified files: /php-src/ext/standard file.c Log: - #41609, file_put_contents is not binary safe when a binary string is given (make it consistent with fwrite&co when unicode=1) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/file.c?r1=1.491&r2=1.492&diff_format=u Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.491 php-src/ext/standard/file.c:1.492 --- php-src/ext/standard/file.c:1.491 Wed May 30 09:16:29 2007 +++ php-src/ext/standard/file.c Thu Jun 14 19:56:35 2007 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.491 2007/05/30 09:16:29 tony2001 Exp $ */ +/* $Id: file.c,v 1.492 2007/06/14 19:56:35 pajoye Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -646,7 +646,7 @@ if (flags & PHP_FILE_APPEND) { mode[0] = 'a'; } - if (flags & PHP_FILE_BINARY) { + if (flags & PHP_FILE_BINARY || (Z_TYPE_P(data) == IS_STRING)) { mode[1] = 'b'; } else if (flags & PHP_FILE_TEXT) { mode[1] = 't';
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php