Title: Pass empty array in wp_register_script instead of array with empty value
Last modified: August 28, 2020

---

# Pass empty array in wp_register_script instead of array with empty value

 *  [MassimoM](https://wordpress.org/support/users/xma/)
 * (@xma)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/pass-empty-array-in-wp_register_script-instead-of-array-with-empty-value/)
 * With query monitor enabled get warning “script missing dependency”
 * file shortcode-for-current-date.php line 105
 * Fixed
 *     ```
       wp_register_script(
           	'shortcode-for-current-date-script',
           	plugins_url('dist/script.js', __FILE__),
           	array()
         	);
       ```
   
 * Was:
 *     ```
       wp_register_script(
           	'shortcode-for-current-date-script',
           	plugins_url('dist/script.js', __FILE__),
           	array('')
         	);
       ```
   

The topic ‘Pass empty array in wp_register_script instead of array with empty value’
is closed to new replies.

 * ![](https://ps.w.org/shortcode-for-current-date/assets/icon-256x256.png?rev=2898049)
 * [Shortcode for Current Date](https://wordpress.org/plugins/shortcode-for-current-date/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcode-for-current-date/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcode-for-current-date/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcode-for-current-date/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcode-for-current-date/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [MassimoM](https://wordpress.org/support/users/xma/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/pass-empty-array-in-wp_register_script-instead-of-array-with-empty-value/)
 * Status: not resolved