From 56a1232923888a5961dced739173d7afb9dc9128 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: http://svn.automattic.com/wordpress/trunk@5428 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 7149c0aeb..e7eeacb65 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; }