From: Jani Taskinen Date: Mon, 3 Sep 2007 11:53:43 +0000 (+0000) Subject: MFB: Fixed bug #42468 (Write lock on file_get_contents fails when using a compression... X-Git-Tag: RELEASE_2_0_0a1~1891 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea2d7049535f702502199e2fe8ec9a34588dac17;p=php MFB: Fixed bug #42468 (Write lock on file_get_contents fails when using a compression stream) --- diff --git a/ext/standard/file.c b/ext/standard/file.c index 5e95f1e09d..39a71f10ac 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -661,7 +661,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; }