[Vtigercrm-developers] Catchable fatal error: Object of class Accounts could not be converted to string in ...
Joe Bordes
joe at tsolucio.com
Thu May 3 11:03:14 PDT 2007
Hi,
All entities (except Users) inherit from crmentity, so what I do is add
the toString function in data/crmentity.php to avoid the error.
Joe
TSolucio
Enrico Weigelt escribió:
> Hi folks,
>
>
> I've got lots of cases where PHP spits out an error message like:
>
> "Catchable fatal error: Object of class Accounts could not
> be converted to string in ....."
>
> This is triggered by the $log->debug() calls at the head of many
> functions, where an log message is cat'ed from the parameters.
> Obviously PHP does not know what to do with objects if they
> should be accessed as strings. No idea if there's an option for
> controlling that or whether it depends on the PHP version.
>
> For now I simply comment out these lines at my site, but that's
> proably not the solution.
>
> How can we cope with these cases ?
>
> Write an generic ObjToString() function which handles that
> (checks if its an object and then prints proper info, etc)
> or add an toString() method to all classes ?
>
>
> cu
>
More information about the vtigercrm-developers
mailing list