diff --git a/lib/private/Updater/VersionCheck.php b/lib/private/Updater/VersionCheck.php
index 6774ef307b555c861b4af59a7f7e4eb35f09f65d..c7b829c9ec5e4e3802d75ffa40e73885cec6cc1d 100644
--- a/lib/private/Updater/VersionCheck.php
+++ b/lib/private/Updater/VersionCheck.php
@@ -101,12 +101,10 @@ class VersionCheck {
 			} else {
 				libxml_clear_errors();
 			}
-		} else {
-			$data = [];
 		}
 
 		// Cache the result
-		$this->config->setAppValue('core', 'lastupdateResult', json_encode($data));
+		$this->config->setAppValue('core', 'lastupdateResult', json_encode($tmp));
 		return $tmp;
 	}
 
diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php
index ff04aa176811c42e97bc5d598f0434ccf0253811..89a335722d7a2a84fdb3449c290df4de367acc26 100644
--- a/tests/lib/Updater/VersionCheckTest.php
+++ b/tests/lib/Updater/VersionCheckTest.php
@@ -161,7 +161,7 @@ class VersionCheckTest extends \Test\TestCase {
 		$this->config
 			->expects($this->at(6))
 			->method('setAppValue')
-			->with('core', 'lastupdateResult', 'false');
+			->with('core', 'lastupdateResult', '[]');
 
 		$updateXml = 'Invalid XML Response!';
 		$this->updater
@@ -265,4 +265,55 @@ class VersionCheckTest extends \Test\TestCase {
 
 		$this->assertSame($expectedResult, $this->updater->check());
 	}
+
+	public function testCheckWithMissingAttributeXmlResponse() {
+		$expectedResult = [
+			'version' => '',
+			'versionstring' => '',
+			'url' => '',
+			'web' => '',
+			'autoupdater' => '',
+		];
+
+		$this->config
+			->expects($this->at(0))
+			->method('getAppValue')
+			->with('core', 'lastupdatedat')
+			->will($this->returnValue(0));
+		$this->config
+			->expects($this->at(1))
+			->method('getSystemValue')
+			->with('updater.server.url', 'https://updates.nextcloud.com/updater_server/')
+			->willReturnArgument(1);
+		$this->config
+			->expects($this->at(2))
+			->method('setAppValue')
+			->with('core', 'lastupdatedat', $this->isType('integer'));
+		$this->config
+			->expects($this->at(4))
+			->method('getAppValue')
+			->with('core', 'installedat')
+			->will($this->returnValue('installedat'));
+		$this->config
+			->expects($this->at(5))
+			->method('getAppValue')
+			->with('core', 'lastupdatedat')
+			->will($this->returnValue('lastupdatedat'));
+
+		// missing autoupdater element should still not fail
+		$updateXml = '<?xml version="1.0"?>
+<owncloud>
+  <version></version>
+  <versionstring></versionstring>
+  <url></url>
+  <web></web>
+</owncloud>';
+		$this->updater
+			->expects($this->once())
+			->method('getUrlContent')
+			->with($this->buildUpdateUrl('https://updates.nextcloud.com/updater_server/'))
+			->will($this->returnValue($updateXml));
+
+		$this->assertSame($expectedResult, $this->updater->check());
+	}
 }