|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-08 02:17 UTC] cataphract@php.net
[2010-09-08 02:18 UTC] cataphract@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cataphract
[2010-09-08 02:18 UTC] cataphract@php.net
[2016-01-26 22:46 UTC] tito dot bouzout at gmail dot com
[2023-01-23 08:10 UTC] patric908 at gmail dot com
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 16:00:01 2025 UTC |
Description: ------------ In bug report #48522 gwynne@php.net said: ------ php-5.3/ext/standard/file.c:614 if (flags & PHP_FILE_APPEND) { mode[0] = 'a'; } else if (flags & LOCK_EX) { Obviously FILE_APPEND and LOCK_EX are mutually exclusive. This is not documented! ------ OBVIOUSLY someone forget to check what is few lines below: ---BEGIN CODE--- if (flags & LOCK_EX && (!php_stream_supports_lock(stream) || php_stream_lock(stream, LOCK_EX))) { ----END CODE---- It seems that `LOCK_EX` check is independent of `FILE_APPEND`. However the docs were "fixed" and now they're telling that `LOCK_EX` and `FILE_APPEND` are mutually exclusive. Test script: --------------- --- From manual page: function.file-put-contents --- Expected result: ---------------- ... It's a documentation bug. Actual result: -------------- Once again I say... it's a DOCS bug!