PHP bug: using a global array in a foreach doesn't work recursively

git-svn-id: file:///home/shish/svn/shimmie2/trunk@247 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-08 21:39:44 +00:00
parent c52b584f3d
commit 2204711880

View file

@ -326,8 +326,9 @@ function add_event_listener($block, $pos=50) {
function send_event($event) {
global $_event_listeners;
ksort($_event_listeners);
foreach($_event_listeners as $listener) {
$my_event_listeners = $_event_listeners;
ksort($my_event_listeners);
foreach($my_event_listeners as $listener) {
$listener->receive_event($event);
}
}