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

We have re-applied Maxime's corrections on EventManager for the new project