OpenIDTestCase::testConversion() compares numeric strings incorrectly.

In 5.3 and below, the conversion behaves differently than in 5.4+.

Comments

twistor created an issue. See original summary.

twistor’s picture

StatusFileSize
new2 KB

Test to illustrate the problem.

twistor’s picture

Status: Active » Needs review
twistor’s picture

StatusFileSize
new2 KB

The last submitted patch, 2: 2660754-1-should-fail.patch, failed testing.

twistor’s picture

StatusFileSize
new2 KB

Those 5.4 failures don't make any sense.

twistor’s picture

StatusFileSize
new2 KB

I wonder how many failures there will be this time.

twistor’s picture

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

I tried to figure out if historically there was some reason they expected the actual output to be '09876...' rather than '9876...' but couldn't find one. So I guess it was just a bug in the test and it should have been checking for '9876...' all along.

Therefore, marking this RTBC - thanks!

fabianx’s picture

Issue tags: +Pending Drupal 7 commit

RTBC + 1, Marking for commit.

  • Fabianx committed 4d5d300 on 7.x
    Issue #2660754 by twistor, David_Rothstein: Invalid numeric comparison...
fabianx’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Pending Drupal 7 commit

Committed and pushed to 7.x! Thanks!

Giving credit to David for his research.

fabianx’s picture

Issue tags: +PHP 5.4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.