From 06b44c90576e200c18dc2aa00ee9faeee8f740c3 Mon Sep 17 00:00:00 2001 From: Val Kulkov Date: Tue, 20 Sep 2016 13:00:05 -0400 Subject: [PATCH] plugin_get() fails to use the default argument Fixes a bug that prevents defaulting to current plugin if plugin_get() is called without arguments. Fixes #21707 Signed-off-by: Damien Regad --- core/plugin_api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/plugin_api.php b/core/plugin_api.php index c6161a4e42..35a724f0ba 100644 --- a/core/plugin_api.php +++ b/core/plugin_api.php @@ -117,7 +117,7 @@ function plugin_get( $p_basename = null ) { trigger_error( ERROR_PLUGIN_NOT_REGISTERED, ERROR ); } - return $g_plugin_cache[$p_basename]; + return $g_plugin_cache[$t_current]; } /**