Skip to content

Commit 2c22ef1

Browse files
committed
Branch check throwing an error when the connection fails
1 parent 1d94162 commit 2c22ef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

root/app/www/public/pages/starr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
$test = $starr->testConnection($app, $starrInstance['url'], $starrInstance['apikey']);
4242
$version = $test['responseHeaders']['X-Application-Version'][0];
43-
$branch = $test['response']['branch'];
43+
$branch = $version && is_array($test) && is_array($test['response']) ? $test['response']['branch'] : '';
4444

4545
if ($test['response']['instanceName'] != $starrInstance['name']) {
4646
$proxyDb->updateStarrAppSetting($starrInstance['id'], 'name', $test['response']['instanceName']);

0 commit comments

Comments
 (0)