[wp-trac] [WordPress Trac] #59406: Undefined and unused variable in WP_Test_Stream::mkdir
WordPress Trac
noreply at wordpress.org
Tue Oct 24 11:32:57 UTC 2023
#59406: Undefined and unused variable in WP_Test_Stream::mkdir
--------------------------------------+-----------------------------
Reporter: david.binda | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.4
Component: Build/Test Tools | Version: 5.6
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"56998" 56998]:
{{{
#!CommitTicketReference repository="" revision="56998"
Tests: Correct the `WP_Test_Stream::mkdir()` method.
The method attempted to check if there is already a file with the same
name, however the conditional used an undefined variable.
This commit prevents directory creation if a file or directory with the
same name already exists, bringing consistency with the PHP `mkdir()`
implementation.
Includes adding missing documentation for the method.
Reference: [https://www.php.net/manual/en/streamwrapper.mkdir.php PHP
Manual: streamWrapper::mkdir()].
Follow-up to [49230].
Props david.binda, sadizaman, rajinsharwar, SergeyBiryukov.
Fixes #59406.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59406#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list