mirror of
git://develop.git.wordpress.org/
synced 2025-03-24 22:10:02 +01:00
Tests: Fix "null to non-nullable" deprecation notice in Tests_Admin_IncludesPlugin::test_get_plugin_files_folder()
.
The `Tests_Admin_IncludesPlugin::_create_plugin()` expects the first parameter to be a text string to be written to a plugin file using `fwrite()`. Passing null causes a `fwrite(): Passing null to parameter #2 ($data) of type string is deprecated` notice. Ref: https://www.php.net/manual/en/function.fwrite Follow-up to [31002]. [41806]. Props jrf, hellofromTonya. See #53635. git-svn-id: https://develop.svn.wordpress.org/trunk@51800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
14f92886f1
commit
c64c2d77aa
@ -366,7 +366,7 @@ class Tests_Admin_IncludesPlugin extends WP_UnitTestCase {
|
||||
public function test_get_plugin_files_folder() {
|
||||
$plugin_dir = WP_PLUGIN_DIR . '/list_files_test_plugin';
|
||||
@mkdir( $plugin_dir );
|
||||
$plugin = $this->_create_plugin( null, 'list_files_test_plugin.php', $plugin_dir );
|
||||
$plugin = $this->_create_plugin( '', 'list_files_test_plugin.php', $plugin_dir );
|
||||
|
||||
$sub_dir = trailingslashit( dirname( $plugin[1] ) ) . 'subdir';
|
||||
mkdir( $sub_dir );
|
||||
|
Loading…
x
Reference in New Issue
Block a user