Skip to content

Commit e186885

Browse files
authored
Merge pull request #2537 from musmanikram/2465-add-php7.4
Update TravisCI config for PHP7.4
2 parents 0fe4dc7 + b32c55a commit e186885

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: php
33
php:
44
- 7.2
55
- 7.3
6+
- 7.4
67
- nightly
78

89
matrix:
@@ -16,7 +17,7 @@ global:
1617

1718
# Recommended by Travis support
1819
sudo: required
19-
dist: trusty
20+
dist: xenial
2021
group: edge
2122

2223
env:
@@ -30,6 +31,10 @@ services:
3031
- postgresql
3132
- redis-server
3233

34+
cache:
35+
directories:
36+
- vendor
37+
3338
script:
3439
- php vendor/bin/phpunit -v
3540

system/Autoloader/FileLocator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public function search(string $path, string $ext = 'php'): array
239239

240240
foreach ($this->getNamespaces() as $namespace)
241241
{
242-
if (is_file($namespace['path'] . $path))
242+
if (isset($namespace['path']) && is_file($namespace['path'] . $path))
243243
{
244244
$foundPaths[] = $namespace['path'] . $path;
245245
}
@@ -288,7 +288,7 @@ protected function getNamespaces()
288288
$namespaces = [];
289289

290290
// Save system for last
291-
$system = null;
291+
$system = [];
292292

293293
foreach ($this->autoloader->getNamespace() as $prefix => $paths)
294294
{

system/HTTP/Files/UploadedFile.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,9 @@ public function move(string $targetPath, string $name = null, bool $overwrite =
182182
}
183183
catch (Exception $e)
184184
{
185-
$error = error_get_last();
186-
throw HTTPException::forMoveFailed(basename($this->path), $targetPath, strip_tags($error['message']));
185+
$error = error_get_last();
186+
$message = isset($error['message']) ? strip_tags($error['message']) : '';
187+
throw HTTPException::forMoveFailed(basename($this->path), $targetPath, $message);
187188
}
188189

189190
@chmod($targetPath, 0777 & ~umask());

0 commit comments

Comments
 (0)