updating DB
* (bug 22666) Submitting user block form with an invalid user name no longer
throws an error
+* (bugs 22665 and 22667) User '0' can now be unblocked and have its block
+ settings changed
== API changes in 1.17 ==
$options = array();
$db =& $this->getDBOptions( $options );
- if ( 0 == $user && $address == '' ) {
+ if ( 0 == $user && $address === '' ) {
# Invalid user specification, not blocked
$this->clear();
return false;
# Try IP block
# TODO: improve performance by merging this query with the autoblock one
# Slightly tricky while handling killExpired as well
- if ( $address ) {
+ if ( $address !== '' ) {
$conds = array( 'ipb_address' => $address, 'ipb_auto' => 0 );
$res = $db->resultObject( $db->select( 'ipblocks', '*', $conds, __METHOD__, $options ) );
$msg = wfMsgReal( $key, $err );
$wgOut->setSubtitle( wfMsgHtml( 'formerror' ) );
$wgOut->addHTML( Xml::tags( 'p', array( 'class' => 'error' ), $msg ) );
- } elseif( $this->BlockAddress ) {
+ } elseif( $this->BlockAddress !== null ) {
# Get other blocks, i.e. from GlobalBlocking or TorBlock extension
wfRunHooks( 'OtherBlockLogLink', array( &$otherBlockedMsgs, $this->BlockAddress ) );