Modification of the EventManager and the Log to work with PHP 5.3

Sorry to make this PR so lately but with PHP 5.4 my enhancement of the event tracking system won't work.