ID: 38907 Updated by: [EMAIL PROTECTED] Reported By: smlerman at gmail dot com -Status: Open +Status: Closed Bug Type: Variables related Operating System: Windows (presumably others) PHP Version: 5.1.6 New Comment:
Already fixed in CVS Previous Comments: ------------------------------------------------------------------------ [2006-09-20 19:13:45] smlerman at gmail dot com Description: ------------ If you try to compare an object to a string, the error message says that the object could not be converted to an int. It makes it a little more difficult to debug code when you're looking for a comparison involving an integer instead of a string. Nothing really major, but a would-be-nice kind of fix. Reproduce code: --------------- <?php class Foo{} $obj = new Foo(); if ($obj == "blah"){ echo "foo"; } else{ echo "bar"; } ?> Expected result: ---------------- Notice: Object of class Foo could not be converted to string in int_convert.php on line 7 Actual result: -------------- Notice: Object of class Foo could not be converted to int in int_convert.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38907&edit=1