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:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user