* (bug 29116) Fix regression breaking CheckUser extension
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 24 May 2011 21:04:50 +0000 (21:04 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 24 May 2011 21:04:50 +0000 (21:04 +0000)
commit536fad8f908e1f2f20b6454985e905e1e5fdde07
tree8651b2c07d93f5b2d6a5be7d37aa9f202db93056
parent6d409c1308988c47903c7eeb1da2c6011334861b
* (bug 29116) Fix regression breaking CheckUser extension

Fixes regression from r84475 and friends which made Block->load() and its new front-end Block::newFromTarget() fail when an empty string was passed in as the IP / $vagueTarget parameter to indicate skipping IP-based lookups.
Added phpunit test cases to confirm that both Block->load() and Block::newFromTarget() work when given null (already ok), '' (as done from CheckUser), or false (not seen, but perfectly legit sounding).
Adjusted comparisons to work as expected.
includes/Block.php
tests/phpunit/includes/BlockTest.php