We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b5406d9 + 2e92ed3 commit 3756150Copy full SHA for 3756150
src/lib/BaseStub.php
@@ -43,7 +43,14 @@ class BaseStub
43
*/
44
public function __construct($hostname, $opts, $channel = null)
45
{
46
- if (!ChannelCredentials::isDefaultRootsPemSet()) {
+ if (!method_exists('ChannelCredentials', 'isDefaultRootsPemSet')) {
47
+ // for backwards compatibility
48
+ // isDefaultRootsPemSet() may not be defined if the pecl extension
49
+ // is not upgraded
50
+ $ssl_roots = file_get_contents(
51
+ dirname(__FILE__).'/../../etc/roots.pem'
52
+ );
53
+ } elseif (!ChannelCredentials::isDefaultRootsPemSet()) {
54
$ssl_roots = file_get_contents(
55
dirname(__FILE__).'/../../etc/roots.pem'
56
);
0 commit comments