From 222bb819b7591d187a48d5687064d530872d27b7 Mon Sep 17 00:00:00 2001 From: rob1n Date: Thu, 10 May 2007 02:33:01 +0000 Subject: [PATCH] Don't discard non-default args in wp_parse_args(). see #4237 git-svn-id: https://develop.svn.wordpress.org/trunk@5428 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 7149c0aeb7..e7eeacb656 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1500,11 +1500,7 @@ function wp_parse_args( $args, $defaults = '' ) { } if ( is_array( $defaults ) ) { - extract( $defaults ); - extract( $r ); - // Note: this only returns the variables that were in $defaults - // to begin with. All other variables are discarded. - return compact( array_keys( $defaults ) ); + return array_merge( $defaults, $r ); } else { return $r; }