joomla/joomla-cms — pull request #4865 by beat (2014-10-20 15:02:31+00:00)
Title: Fixed JLog class to accept event handler callables objects with closures

This PR fixes JLog class as used in the Joomla Debug plugin, to accept callables of type array(object, method) where object has closures.

serialize() of object with closures generates a fatal error in php.

Thus for closures as handlers, this has been fixed already by using spl_object_hash() for the closure. But in case of a handler that is array(object, method) where object might have variables containing closures (or objects containing variables with closures), it is still generating a fatal error.

This PR is obvious with a source-code review. Tests should check that plugins continue to work fine (e.g. remember-me and sef). If desired, a valid test-code that generates a fatal with master, but works fine with PR can be provided.