Jump to content

GoogleClientAPI: Deprecated: implode()


kalimati
 Share

Recommended Posts

Is any update for GoogleClientAPI in the pipeline?

Deprecated
: implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/domain.com/public_html/site/assets/GoogleClientAPI/google-api-php-client/src/Google/Service/Resource.php on line 297

Link to comment
Share on other sites

@kalimati That file is not actually included in the module. When you install the module, it downloads the Google Client API library directly from Google. It looks like there's a bug in the version you have installed. Actually, I remember that one, they had the arguments in the wrong order for an implode() call. That's a simple one to fix if you want to edit the file yourself. Another option would be to upgrade the library. https://github.com/googleapis/google-api-php-client/releases/ 

You can check the box to change the version in the module settings, but unless you are also seeing other errors, I would probably just edit the Resource.php file directly and fix it, so that you don't have to go through re-authenticate.

image.png

Here's the change to make on line 297 of /site/assets/GoogleClientAPI/google-api-php-client/src/Google/Service/Resource.php

// $requestUrl .= '?' . implode($queryVars, '&'); // OLD 
$requestUrl .= '?' . implode('&', $queryVars); // NEW

 

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...