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.
Built from https://develop.svn.wordpress.org/trunk@56998


git-svn-id: http://core.svn.wordpress.org/trunk@56509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2023-10-24 11:34:40 +00:00
parent 8a2a1f4b41
commit e6a1e0059e
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-56996';
$wp_version = '6.5-alpha-56998';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.