Browse Source

Minor code cleanup, add newer php version for travis tests

pull/23/head
Timothy Warren 1 month 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:
6 6
 php:
7 7
   - 7.1
8 8
   - 7.2
9
+  - 7.3
10
+  - 7.4
9 11
   - hhvm
10 12
   - nightly
11 13
 

+ 2
- 2
src/Controller.php View File

@@ -154,7 +154,7 @@ class Controller {
154 154
 		if (null === $url)
155 155
 		{
156 156
 			$url = $util->isViewPage()
157
-				? $this->request->getUri()->__toString()
157
+				? (string) $this->request->getUri()
158 158
 				: $serverParams['HTTP_REFERER'];
159 159
 		}
160 160
 
@@ -245,7 +245,7 @@ class Controller {
245 245
 		$csp = [
246 246
 			"default-src 'self'",
247 247
 			"object-src 'none'",
248
-			"frame-src *.youtube.com",
248
+			'frame-src *.youtube.com',
249 249
 		];
250 250
 
251 251
 		$view->addHeader('Content-Security-Policy', implode('; ', $csp));

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

@@ -44,7 +44,7 @@ class API {
44 44
 		array_multisort($sort, SORT_ASC, $array);
45 45
 
46 46
 		// Re-key array items by their ids
47
-		if (array_key_exists('id', $array[0]))
47
+		if (array_key_exists('id', (array)$array[0]))
48 48
 		{
49 49
 			$keyed = [];
50 50
 

Loading…
Cancel
Save