diff --git a/.travis.yml b/.travis.yml index 38328d45..4a25e07f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,8 @@ install: php: - 7.1 - 7.2 + - 7.3 + - 7.4 - hhvm - nightly diff --git a/src/Controller.php b/src/Controller.php index 6f0d7b44..e76784d5 100644 --- a/src/Controller.php +++ b/src/Controller.php @@ -154,7 +154,7 @@ class Controller { if (null === $url) { $url = $util->isViewPage() - ? $this->request->getUri()->__toString() + ? (string) $this->request->getUri() : $serverParams['HTTP_REFERER']; } @@ -245,7 +245,7 @@ class Controller { $csp = [ "default-src 'self'", "object-src 'none'", - "frame-src *.youtube.com", + 'frame-src *.youtube.com', ]; $view->addHeader('Content-Security-Policy', implode('; ', $csp)); diff --git a/src/Model/API.php b/src/Model/API.php index a411b7ae..ebc7c06c 100644 --- a/src/Model/API.php +++ b/src/Model/API.php @@ -44,7 +44,7 @@ class API { array_multisort($sort, SORT_ASC, $array); // Re-key array items by their ids - if (array_key_exists('id', $array[0])) + if (array_key_exists('id', (array)$array[0])) { $keyed = [];