Skip to content

Commit 4203864

Browse files
committed
Allow empty src for script module for the sake of Tests_Blocks_Register::test_missing_asset_file_register_block_script_module_id
1 parent 858ef91 commit 4203864

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/wp-includes/class-wp-script-modules.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* import: 'static'|'dynamic',
1717
* }
1818
* @phpstan-type ScriptModule array{
19-
* src: non-empty-string,
19+
* src: string,
2020
* version: string|false|null,
2121
* dependencies: Dependency[],
2222
* in_footer: bool,
@@ -133,10 +133,6 @@ public function register( string $id, string $src, array $deps = array(), $versi
133133
_doing_it_wrong( __METHOD__, __( 'Non-empty string required for id.' ), '6.9.0' );
134134
return;
135135
}
136-
if ( '' === $src ) {
137-
_doing_it_wrong( __METHOD__, __( 'Non-empty string required for src.' ), '6.9.0' );
138-
return;
139-
}
140136

141137
if ( ! isset( $this->registered[ $id ] ) ) {
142138
$dependencies = array();

0 commit comments

Comments
 (0)