Skip to content

Commit

Permalink
Another tweak to the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
austinwbest committed Dec 28, 2024
1 parent d8dfcd8 commit e239af5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/app/www/public/ajax/starr.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
if ($test['code'] != 200) {
$error = 'Failed to connect with code: ' . $test['code'];
} else {
if (str_contains($test['response'], 'doctype')) {
if (!is_array($test['response']) && str_contains($test['response'], 'doctype')) {
$error = 'The starr app returned HTML, this typically happens with a bad base URL.';
} else {
$result = 'Connection successful to ' . $app . ': Instance ' . $test['response']['instanceName'];
Expand Down Expand Up @@ -61,7 +61,7 @@
$name = 'ERROR';

if ($test['code'] == 200) {
if (str_contains($test['response'], 'doctype')) {
if (!is_array($test['response']) && str_contains($test['response'], 'doctype')) {
$error = 'The starr app returned HTML, this typically happens with a bad base URL.';
} else {
$name = $test['response']['instanceName'];
Expand Down

0 comments on commit e239af5

Please sign in to comment.