We have moved to Github. Please open tickets there.

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#628 closed Defect (fixed)

Events chain doesn't finish when event handler returns false (patch provided)

Reported by: diego Owned by:
Priority: critical Milestone: Elgg 1.1
Component: Core Version: 1.0
Severity: critical Keywords: events, handlers, chain
Cc: ben,marcus Difficulty:

Description

At http://docs.elgg.org/wiki/Events says that when an event handler returns false it would halt the event chain.

However it doesn't happen because all the event handlers are called despite their return value:

elgglib.php 1355-1357

if ($eventfunction($event, $object_type, $object) === false) {
   $return = false;
}

The provided patch fix this problem halting the event chain when the eventhandler function returns false

Attachments (1)

true-event-chain-termination.patch (1.6 KB) - added by diego 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by diego

comment:1 Changed 4 years ago by marcus

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:2516]) Closes #628: Event change now terminates on false. Nice spot :)

comment:2 Changed 4 years ago by marcus

(In [svn:2530]) Fixes #655, Refs #628: Install now working with correct event chain (#628).

Note: See TracTickets for help on using tickets.