Quantcast

encodeObject function

classic Classic list List threaded Threaded
3 messages Options
macjohn macjohn
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

encodeObject function

Hi,

I tried to guess why the encodeObject() function test if $Object is_ressource, is_object, is_array, and if it isn't any of these, then encodes as utf8. With this logic, booleans values apears as string '', or as string '1'. Null is ''. For a better representation I added the following lines:

        } else if (is_bool($Object)) {
            return $Object;
        } else if (is_null($Object)) {
            return 'NULL';
        } else if (is_numeric($Object)) {
            return $Object;

and booleans values are returned as true or false, null variables are returned as null, and numeric variables are returned as numbers.
Christoph Dorn Christoph Dorn
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: encodeObject function

I think this is fixed in FirePHP 1.0. I'll add this to FirePHPCore as well. Thanks!
Christoph Dorn Christoph Dorn
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: encodeObject function

Loading...