Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #36 from stork/hot-fix/35
Browse files Browse the repository at this point in the history
Suppress open_basedir restriction PHP warnings, fixes #35
  • Loading branch information
steinkel committed Apr 22, 2020
2 parents 6354457 + eb574df commit f135be0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions oven.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ public function getComposerSystemPath()
$paths = explode(':', getenv('PATH'));
foreach ($paths as $path) {
$composerPath = $path . DIRECTORY_SEPARATOR . $this->composerFilename;
if (is_readable($composerPath)) {
if (@is_readable($composerPath)) {
return $composerPath;
}

$composerBinaryBath = $path . DIRECTORY_SEPARATOR . pathinfo($this->composerFilename, PATHINFO_FILENAME);
if (is_executable($composerBinaryBath)) {
if (@is_executable($composerBinaryBath)) {
return $composerBinaryBath;
}
}
Expand Down Expand Up @@ -151,11 +151,11 @@ protected function _getComposerPathFromQuery()
return false;
}

if (!is_readable($path = $_POST[$var])) {
if (!@is_readable($path = $_POST[$var])) {
throw new Exception("Composer installation not found at {$path}");
}

if (substr($path, -5) != '.phar' && !is_executable($path)) {
if (substr($path, -5) != '.phar' && !@is_executable($path)) {
throw new Exception("Composer binary is not executable");
}

Expand Down Expand Up @@ -302,7 +302,7 @@ protected function _runFinalise()
protected function _runInstallComposer()
{
$result = [];
if (!is_readable($this->composerPath) || !($version = $this->_getComposerVersion())) {
if (!@is_readable($this->composerPath) || !($version = $this->_getComposerVersion())) {
$result['log'] = $this->_installComposer($this->currentDir, $this->composerFilename);
$version = $this->_getComposerVersion();
} else {
Expand Down

0 comments on commit f135be0

Please sign in to comment.