Changeset 47429
- Timestamp:
- 03/04/2020 11:58:31 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r47427 r47429 4350 4350 * 4351 4351 * @param string|array|object $args Value to merge with $defaults. 4352 * @param array $defaults Optional. Array that serves as the defaults. Default empty. 4352 * @param array $defaults Optional. Array that serves as the defaults. 4353 * Default empty array. 4353 4354 * @return array Merged user defined values with defaults. 4354 4355 */ 4355 function wp_parse_args( $args, $defaults = '') {4356 function wp_parse_args( $args, $defaults = array() ) { 4356 4357 if ( is_object( $args ) ) { 4357 4358 $parsed_args = get_object_vars( $args ); … … 4362 4363 } 4363 4364 4364 if ( is_array( $defaults ) ) {4365 if ( is_array( $defaults ) && $defaults ) { 4365 4366 return array_merge( $defaults, $parsed_args ); 4366 4367 }
Note: See TracChangeset
for help on using the changeset viewer.