Merge pull request #21652 from stanley-cheung/php-fix-roots-pem-rel-branch

PHP: Fix logic setting roots pem
v1.26.x
Stanley Cheung 5 years ago committed by GitHub
commit 2e59cdd4d1
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