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:
502cbf6
)
GlobalVarConfig shouldn't throw exceptions for null-valued config settings
author
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 23 Jun 2014 17:03:53 +0000
(13:03 -0400)
committer
Brad Jorsch
<bjorsch@wikimedia.org>
Mon, 23 Jun 2014 17:03:53 +0000
(13:03 -0400)
Use array_key_exists rather than isset to test $GLOBALS.
Bug: 66986
Change-Id: I9beabd79e1d52966b9184c9647af5a2a31c19276
includes/config/GlobalVarConfig.php
patch
|
blob
|
history
diff --git
a/includes/config/GlobalVarConfig.php
b/includes/config/GlobalVarConfig.php
index
61a76b7
..
0d7f3f0
100644
(file)
--- a/
includes/config/GlobalVarConfig.php
+++ b/
includes/config/GlobalVarConfig.php
@@
-69,7
+69,7
@@
class GlobalVarConfig implements Config {
*/
protected function getWithPrefix( $prefix, $name ) {
$var = $prefix . $name;
- if ( !
isset( $GLOBALS[ $var ]
) ) {
+ if ( !
array_key_exists( $var, $GLOBALS
) ) {
throw new ConfigException( __METHOD__ . ": undefined variable: '$var'" );
}
return $GLOBALS[ $var ];