PHP: Fix logic setting roots pem

pull/21652/head
Stanley Cheung 5 years ago
parent de893acb6a
commit 26578836f2
  1. 3
      src/php/lib/Grpc/BaseStub.php

@ -43,7 +43,8 @@ class BaseStub
*/
public function __construct($hostname, $opts, $channel = null)
{
if (!ChannelCredentials::isDefaultRootsPemSet()) {
if (!method_exists('ChannelCredentials', 'isDefaultRootsPemSet') ||
!ChannelCredentials::isDefaultRootsPemSet()) {
$ssl_roots = file_get_contents(
dirname(__FILE__).'/../../../../etc/roots.pem'
);

Loading…
Cancel
Save