Skip to content

Commit 043a32c

Browse files
author
Serhiy Shkolyarenko
committed
MAGETWO-40822: [PHP7] Incompatible tests
fixed decoding
1 parent 0886352 commit 043a32c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup/src/Magento/Setup/Controller/Connect.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public function __construct(ComposerInformation $composerInformation, ConnectMan
4242
*/
4343
public function saveAuthJsonAction()
4444
{
45-
$params = Json::decode($this->getRequest()->getContent(), Json::TYPE_ARRAY);
45+
$params = [];
46+
if ($this->getRequest()->getContent()) {
47+
$params = Json::decode($this->getRequest()->getContent(), Json::TYPE_ARRAY);
48+
}
4649
try {
4750
$userName = isset($params['username']) ? $params['username'] : '';
4851
$password = isset($params['password']) ? $params['password'] : '';

0 commit comments

Comments
 (0)