joe-walker/SonataAdminBundle — comment on commit 5d180a943713e8d2af276edd60e37c37b3805d91
File:  line 0
By joe-walker:

This was using call_user_func_array() to call the getter method, which does not invoke the __call() method. Since no arguments are being passed to the method, attempting to call the getter with "$object->$getter()" and catching the exceptions raised works for this purpose and has the advantage of allowing the use of __call().

However this has the serious downside of masking anything raising BadMethodCallException or ErrorException in the getter method and should therefore not be used. This is a reason why making automatic getters and setters using the __call() magic method is probably not a good idea,