Details
-
Bug
-
Resolution: Fixed
-
Medium
-
4.0.0
-
None
-
Operating System:NA
PHP Version: 5.2.5
Database and version: NA
Browser (and version): NA
Description
The cause of this issue is in eZCollaborationItemHandler::fetchList in kernel/classes/ezcollaborationitemhandler.php
It can be fixed by changing line 589
$list[] =& $handlerInstance;
to
$list[] = $handlerInstance;
You can see what's happening looking at the code
foreach ( $activeHandlers as $handler ) { $handlerInstance = eZCollaborationItemHandler::instantiate( $handler, $repositories ); if ( $handlerInstance !== null ) $list[] =& $handlerInstance; }
The reference to $handlerInstance is being appended to the list array. When there are multiple handlers the reference is updated with the values returned from eZCollaborationItemHandler::instantiate. "list" becomes an array of references to the last valid handler instance.
Steps to reproduce
Add an additional workflow that contains a collaboration handler. e.g. eZApprove2 http://projects.ez.no/ezapprove2
Assuming the extension is activated visiting My Account -> My notification settings will show the last Collaboration notification item repeated.