Merge pull request #21651 from stanley-cheung/php-fix-roots-pem

PHP: Fix logic setting roots pem
pull/20316/head
Stanley Cheung 5 years ago committed by GitHub
commit b0d7e680cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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