Skip to content

Commit 4c67918

Browse files
authored
Remove realpath() to avoid open_basedir() errors (#70)
1 parent 6793336 commit 4c67918

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CaBundle.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ private static function isFile($certFile, LoggerInterface $logger = null)
368368
{
369369
$isFile = @is_file($certFile);
370370
if (!$isFile && $logger) {
371-
$logger->debug(sprintf('Checked CA file %s does not exist or it is not a file.', realpath($certFile)));
371+
$logger->debug(sprintf('Checked CA file %s does not exist or it is not a file.', $certFile));
372372
}
373373

374374
return $isFile;
@@ -383,7 +383,7 @@ private static function isDir($certDir, LoggerInterface $logger = null)
383383
{
384384
$isDir = @is_dir($certDir);
385385
if (!$isDir && $logger) {
386-
$logger->debug(sprintf('Checked directory %s does not exist or it is not a directory.', realpath($certDir)));
386+
$logger->debug(sprintf('Checked directory %s does not exist or it is not a directory.', $certDir));
387387
}
388388

389389
return $isDir;
@@ -398,7 +398,7 @@ private static function isReadable($certFileOrDir, LoggerInterface $logger = nul
398398
{
399399
$isReadable = @is_readable($certFileOrDir);
400400
if (!$isReadable && $logger) {
401-
$logger->debug(sprintf('Checked file or directory %s is not readable.', realpath($certFileOrDir)));
401+
$logger->debug(sprintf('Checked file or directory %s is not readable.', $certFileOrDir));
402402
}
403403

404404
return $isReadable;

0 commit comments

Comments
 (0)