]> granicus.if.org Git - php/commitdiff
Fixed bug #42468 (Write lock on file_get_contents fails when using a
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Sep 2007 02:53:56 +0000 (02:53 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Sep 2007 02:53:56 +0000 (02:53 +0000)
compression stream).

NEWS
ext/standard/file.c

diff --git a/NEWS b/NEWS
index b337456f26e317a7997f966b14db2fd8b7d8b3b9..9264a18bf17d2b8f4dc41830be72e85d09f11c0c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 20??, PHP 5.2.5
-- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
 - Upgraded PCRE to version 7.3 (Nuno)
+- Added optional parameter $provide_object to debug_backtrace(). (Sebastian)
 
 - Fixed bug #42512 (ip2long('255.255.255.255') should return 4294967295 on
   64-bit PHP). (Derick)
@@ -12,6 +12,8 @@ PHP                                                                        NEWS
   options). (Dmitry)
 - Fixed bug #42452 (PDO classes do not expose Reflection API information).
   (Hannes)
+- Fixed bug #42468 (Write lock on file_get_contents fails when using a 
+  compression stream). (Ilia)
 - Fixed bug #42359 (xsd:list type not parsed). (Dmitry)
 - Fixed bug #42326 (SoapServer crash). (Dmitry)
 - Fixed bug #42086 (SoapServer return Procedure '' not present for WSIBasic
index d0ae78fb54041234495780c750bf3b2575fba6e6..04d4dc3434f49f1ee6205fffb5e3096ca9f0ac8c 100644 (file)
@@ -610,7 +610,7 @@ PHP_FUNCTION(file_put_contents)
                RETURN_FALSE;
        }
 
-       if (flags & LOCK_EX && php_stream_lock(stream, LOCK_EX)) {
+       if (flags & LOCK_EX && (!php_stream_supports_lock(stream) || php_stream_lock(stream, LOCK_EX))) {
                php_stream_close(stream);
                RETURN_FALSE;
        }