It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I46261416f7603558dceb76ebe695a5cac274e417
Visiting Special:BookSources/invalid would not show any error message
because "invalid" would get stripped away by cleanIsbn(), and then
appear as the empty string.
Instead, first validate the provided ISBN (if any), and display the
error message if invalid. Then show the form and book details.
Tests included.
Also remove an unused variable.
Change-Id: I40b703eace956ebbcdc0a2c2986b2c10474dd1fd
Found by running tests under a version of PHP patched to report
case mismatches as E_STRICT errors.
User classes:
* MIMEsearchPage
* MostlinkedTemplatesPage
* SpecialBookSources
* UnwatchedpagesPage
Internal classes:
* DOMXPath
* stdClass
* XMLReader
Did not change:
* testautoLoadedcamlCLASS
* testautoloadedserializedclass
Change-Id: Idc8caa82cd6adb7bab44b142af2b02e15f0a89ee
PHP's "equal" (==) operator considers the integer 0 to be equal to
the string 'X', and when 'X' is converted to a number, it becomes 0.
Neither is desired here.
* Fail when an X is encountered while calculating the check digit.
(X can only occur as the check digit of an ISBN-10.)
* Fixed the check digit comparisons by adding an explicit string cast.
* Used the "identical" operator to make it more obvious that no type
juggling should take place during the comparisons.
* Added some test cases.
* Removed an outdated TODO.
Bug: 67021
Change-Id: I85f53c41f403a60340e9441757fe66b9764e623c