From e981493d150dc292d8a1411a3daca97ad37db0dc Mon Sep 17 00:00:00 2001 From: Bastian Allgeier Date: Fri, 1 Mar 2024 11:58:39 +0100 Subject: [PATCH] Suppress warnings in remote class if system CA is outside of open_basedir --- src/Http/Remote.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Http/Remote.php b/src/Http/Remote.php index bf38070db2..2d596ff894 100644 --- a/src/Http/Remote.php +++ b/src/Http/Remote.php @@ -59,7 +59,9 @@ public function __construct(string $url, array $options = []) // use the system CA store by default if // one has been configured in php.ini $cainfo = ini_get('curl.cainfo'); - if (empty($cainfo) === false && is_file($cainfo) === true) { + + // Suppress warnings e.g. if system CA is outside of open_basedir (See: issue #6236) + if (empty($cainfo) === false && @is_file($cainfo) === true) { $defaults['ca'] = self::CA_SYSTEM; }