dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82123ff
)
Fix User::idFromName to actually return null on failure, as the doc suggests.
author
Happy-melon
<happy-melon@users.mediawiki.org>
Sat, 19 Sep 2009 12:46:51 +0000
(12:46 +0000)
committer
Happy-melon
<happy-melon@users.mediawiki.org>
Sat, 19 Sep 2009 12:46:51 +0000
(12:46 +0000)
includes/User.php
patch
|
blob
|
history
diff --git
a/includes/User.php
b/includes/User.php
index
995e6c1
..
1f79998
100644
(file)
--- a/
includes/User.php
+++ b/
includes/User.php
@@
-467,7
+467,7
@@
class User {
$s = $dbr->selectRow( 'user', array( 'user_id' ), array( 'user_name' => $nt->getText() ), __METHOD__ );
if ( $s === false ) {
- $result =
0
;
+ $result =
null
;
} else {
$result = $s->user_id;
}
@@
-2151,7
+2151,7
@@
class User {
}
# Use strict parameter to avoid matching numeric 0 accidentally inserted
# by misconfiguration: 0 == 'foo'
- return in_array( $action, $this->getRights(), true )
;
+ return in_array( $action, $this->getRights(), true )
}
/**