From 9b7992585012d726323ea7787fe079335d94d002 Mon Sep 17 00:00:00 2001 From: Jairo Perez Date: Thu, 10 Aug 2023 16:28:12 -0400 Subject: [PATCH] Pass the second parameter to call_user_func_array() via array_values() so you don't have keys that are treated as named parameters --- src/ShortcodeManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShortcodeManager.php b/src/ShortcodeManager.php index d98bbf2..f5e40ea 100644 --- a/src/ShortcodeManager.php +++ b/src/ShortcodeManager.php @@ -380,7 +380,7 @@ public function do_tag( $tag, array $atts = [], $content = null ) { protected function instantiate( $interface, $class, array $args ) { try { if ( is_callable( $class ) ) { - $class = call_user_func_array( $class, $args ); + $class = call_user_func_array( $class, array_values( $args ) ); } if ( is_string( $class ) ) {