Browse Source

Minor code cleanup, add newer php version for travis tests

tags/v4.1.0
Timothy Warren 5 months ago
parent
commit
c6b74e2775
3 changed files with 5 additions and 3 deletions
  1. +2
    -0
      .travis.yml
  2. +2
    -2
      src/Controller.php
  3. +1
    -1
      src/Model/API.php

+ 2
- 0
.travis.yml View File

@@ -6,6 +6,8 @@ install:
php:
- 7.1
- 7.2
- 7.3
- 7.4
- hhvm
- nightly


+ 2
- 2
src/Controller.php View File

@@ -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));

+ 1
- 1
src/Model/API.php View File

@@ -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 = [];


Loading…
Cancel
Save