r63137 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r63136
|
r63137
|
r63138
>
Date:
21:07, 1 March 2010
Author:
ialex
Status:
ok
Tags:
Comment:
Per Simetrical's comment on
r63048
: use "$user instanceof User" so that it won't break whatever User::newFromName() returns on failure
Modified paths:
/trunk/phase3/includes/specials/SpecialBlockip.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/specials/SpecialBlockip.php
—
—
@@ -410,7 +410,7 @@
411
411
# Username block
412
412
if( $wgSysopUserBans ) {
413
413
$user = User::newFromName( $this->BlockAddress );
414
- if( $user !== false && $user->getId() ) {
414
+ if( $user instanceof User && $user->getId() ) {
415
415
# Use canonical name
416
416
$userId = $user->getId();
417
417
$this->BlockAddress = $user->getName();
Past revisions this follows-up on
Revision
Commit summary
Author
Date
r63048
* (
bug 22666
) Submitting user block form with an invalid user name no longer ...
ialex
15:24, 27 February 2010
Status & tagging log
16:19, 16 March 2010
😂
(
talk
|
contribs
)
changed the
status
of r63137
[
removed:
new
added:
ok]