@@ -46,7 +46,7 @@ class WP_Scripts extends WP_Dependencies {
4646 * Holds handles of scripts which are enqueued in footer.
4747 *
4848 * @since 2.8.0
49- * @var array
49+ * @var string[]
5050 */
5151 public $ in_footer = array ();
5252
@@ -118,7 +118,7 @@ class WP_Scripts extends WP_Dependencies {
118118 * List of default directories.
119119 *
120120 * @since 2.8.0
121- * @var array
121+ * @var string[]|null
122122 */
123123 public $ default_dirs ;
124124
@@ -374,7 +374,8 @@ public function do_item( $handle, $group = false ) {
374374 $ filtered_src = apply_filters ( 'script_loader_src ' , $ src , $ handle );
375375
376376 if (
377- $ this ->in_default_dir ( $ filtered_src )
377+ is_string ( $ filtered_src )
378+ && $ this ->in_default_dir ( $ filtered_src )
378379 && ( $ before_script || $ after_script || $ translations_stop_concat || $ this ->is_delayed_strategy ( $ strategy ) )
379380 ) {
380381 $ this ->do_concat = false ;
@@ -589,9 +590,9 @@ public function get_inline_script_tag( $handle, $position = 'after' ) {
589590 *
590591 * @since 2.1.0
591592 *
592- * @param string $handle Name of the script to attach data to.
593- * @param string $object_name Name of the variable that will contain the data.
594- * @param array $l10n Array of data to localize.
593+ * @param string $handle Name of the script to attach data to.
594+ * @param string $object_name Name of the variable that will contain the data.
595+ * @param array<string, mixed> $l10n Array of data to localize.
595596 * @return bool True on success, false on failure.
596597 */
597598 public function localize ( $ handle , $ object_name , $ l10n ) {
0 commit comments