Skip to content

Fixed bug #62976 (Notice: could not be converted to int when comparing s... #179

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

Closed
wants to merge 1 commit into from

Conversation

reeze
Copy link
Contributor

@reeze reeze commented Aug 30, 2012

Hi, this is a proposal patch for bug #62976 https://bugs.php.net/bug.php?id=62976

It's really surprised to get a true when two different classes's instances was equal,
even they can't be cast.

If both of the objects can't be casted to compare, they are not equal.

for your reference:
http://3v4l.org/f0qlB

…g some builtin classes)

If both of the objects can't be casted to compare, they are not equal
@travisbot
Copy link

This pull request fails (merged 80b94df into 8afb848).

@php-pulls
Copy link

Comment on behalf of laruence at php.net:

I already got a fix last night, just need to test so didin't commit, and seems your fix is not better than mine, so closed. thanks

@php-pulls php-pulls closed this Aug 31, 2012
@laruence
Copy link
Member

and btw, your fix is wrong about that -1.

according to manual:
object anything object is always greater ,

that means op1 is always greater than op2 if they are both objects

@laruence
Copy link
Member

of course I mean they are both objects and can not be compared via normal way

@reeze
Copy link
Contributor Author

reeze commented Aug 31, 2012

Then I think you could add a test case for that. ensure any future change won't break that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants