Skip to content

Commit

Permalink
Merge pull request #2537 from musmanikram/2465-add-php7.4
Browse files Browse the repository at this point in the history
Update TravisCI config for PHP7.4
  • Loading branch information
lonnieezell authored Feb 11, 2020
2 parents 0fe4dc7 + b32c55a commit e186885
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ language: php
php:
- 7.2
- 7.3
- 7.4
- nightly

matrix:
Expand All @@ -16,7 +17,7 @@ global:

# Recommended by Travis support
sudo: required
dist: trusty
dist: xenial
group: edge

env:
Expand All @@ -30,6 +31,10 @@ services:
- postgresql
- redis-server

cache:
directories:
- vendor

script:
- php vendor/bin/phpunit -v

Expand Down
4 changes: 2 additions & 2 deletions system/Autoloader/FileLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function search(string $path, string $ext = 'php'): array

foreach ($this->getNamespaces() as $namespace)
{
if (is_file($namespace['path'] . $path))
if (isset($namespace['path']) && is_file($namespace['path'] . $path))
{
$foundPaths[] = $namespace['path'] . $path;
}
Expand Down Expand Up @@ -288,7 +288,7 @@ protected function getNamespaces()
$namespaces = [];

// Save system for last
$system = null;
$system = [];

foreach ($this->autoloader->getNamespace() as $prefix => $paths)
{
Expand Down
5 changes: 3 additions & 2 deletions system/HTTP/Files/UploadedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ public function move(string $targetPath, string $name = null, bool $overwrite =
}
catch (Exception $e)
{
$error = error_get_last();
throw HTTPException::forMoveFailed(basename($this->path), $targetPath, strip_tags($error['message']));
$error = error_get_last();
$message = isset($error['message']) ? strip_tags($error['message']) : '';
throw HTTPException::forMoveFailed(basename($this->path), $targetPath, $message);
}

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

0 comments on commit e186885

Please sign in to comment.