From 451e71928848e2cd5b04f4dcdc2c7f323252a97a Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Sat, 27 May 2006 17:50:45 +0000 Subject: [PATCH] Fix a "return by reference" glitch --- include/plugin_api.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/plugin_api.inc.php b/include/plugin_api.inc.php index e0930ee..393560b 100644 --- a/include/plugin_api.inc.php +++ b/include/plugin_api.inc.php @@ -974,7 +974,11 @@ class serendipity_plugin_api { return false; } - $plugins =& serendipity_plugin_api::get_event_plugins(); + // We can NOT use a "return by reference" here, because then when + // a plugin executes another event_hook, the referenced variable within + // that call will overwrite the previous original plugin listing and + // skip the execution of any follow-up plugins. + $plugins = serendipity_plugin_api::get_event_plugins(); if (is_array($plugins)) { // foreach() operates on copies of values, but we want to operate on references, so we use while() -- 2.39.5