From: Tim Starling Date: Fri, 28 Apr 2017 05:14:57 +0000 (+1000) Subject: EtcdConfig: use array_key_exists(), the value can be null X-Git-Tag: 1.31.0-rc.0~3400^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=4e6270223875bc09c816931e2ac7a992d963205e;p=lhc%2Fweb%2Fwiklou.git EtcdConfig: use array_key_exists(), the value can be null Change-Id: Iae175401da8d49f5475d8c88cc5390b16e7cba32 --- diff --git a/includes/config/EtcdConfig.php b/includes/config/EtcdConfig.php index d3fbd654a7..06d8dfb4cf 100644 --- a/includes/config/EtcdConfig.php +++ b/includes/config/EtcdConfig.php @@ -251,7 +251,7 @@ class EtcdConfig implements Config, LoggerAwareInterface { $name = basename( $node['key'] ); $value = $this->unserialize( $node['value'] ); - if ( !is_array( $value ) || !isset( $value['val'] ) ) { + if ( !is_array( $value ) || !array_key_exists( 'val', $value ) ) { return [ null, "Failed to parse value for '$name'.", false ]; }