From 4e6270223875bc09c816931e2ac7a992d963205e Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 28 Apr 2017 15:14:57 +1000 Subject: [PATCH] EtcdConfig: use array_key_exists(), the value can be null Change-Id: Iae175401da8d49f5475d8c88cc5390b16e7cba32 --- includes/config/EtcdConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ]; } -- 2.20.1