Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

booleans values apears as string '', or as string '1'. Null is ''. #4

Closed
cadorn opened this issue Jan 5, 2012 · 2 comments
Closed
Assignees
Labels

Comments

@cadorn
Copy link
Member

cadorn commented Jan 5, 2012

See: http://firephp.842658.n2.nabble.com/encodeObject-function-td6902405.html

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.

@ghost ghost assigned cadorn Jan 5, 2012
cadorn added a commit that referenced this issue Jul 10, 2014
Issue #4 ( bools appear ''/1,  null as '')
@cadorn
Copy link
Member Author

cadorn commented Jul 10, 2014

@bkdotcom so is this fixed now?

@bkdotcom
Copy link
Contributor

@cadorn indeed it is! (sorry for the delay)

thanks

@cadorn cadorn added the bug label Nov 12, 2017
@cadorn cadorn closed this as completed Nov 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants