Last modified: 2014-10-01 19:22:37 UTC
I noticed this when checking old TODOs and reading the code. It is a bug arising in part from the use of PHP's loose equality (==) operator. Steps to reproduce: 1. Open <https://en.wikipedia.org/wiki/Special:BookSources/1413304541> 2. Open <https://en.wikipedia.org/wiki/Special:BookSources/141330454X> 3. Open <https://en.wikipedia.org/wiki/Special:BookSources/1413304540> Actual results: #1 gives, "The given ISBN does not appear to be valid; check for errors copying from the original source." #2 and #3 give no error. Expected results: both #1 and #2 should give that error message. Only #3 should give no error.
Change 141654 had a related patch set uploaded by PleaseStand: Special:BookSources: Correct ISBN-10 validation for numbers ending in X https://gerrit.wikimedia.org/r/141654
Unfortunately, there are more problems: 4. Open <https://en.wikipedia.org/wiki/Special:BookSources/14133X4540> 5. Open <https://en.wikipedia.org/wiki/Special:BookSources/97814133X4541> 6. Open <https://en.wikipedia.org/wiki/Special:BookSources/978035642615X> 7. Open <https://en.wikipedia.org/wiki/Special:BookSources/9781413304541> 8. Open <https://en.wikipedia.org/wiki/Special:BookSources/9780356426150> Actual results: none of #4-8 give an error. Expected results: #4-6 should give an error. Only #7-8 should give no error.
Change 141654 merged by jenkins-bot: Special:BookSources: Correct validation of ISBNs containing X https://gerrit.wikimedia.org/r/141654
successfully merged