1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00

MFB: Fixed bug #42468 (Write lock on file_get_contents fails when using a compression stream)

This commit is contained in:
Jani Taskinen
2007-09-03 11:53:43 +00:00
parent c486071f00
commit ea2d704953
+1 -1
View File
@@ -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;
}