Skip to content

Commit 464f131

Browse files
ricardofontanellimattwhisenhunt
authored andcommitted
Fix directory and reports stop channel urls
Report stop channel and Directory stop channel methods uses a different service path then their default class. When the lib build the full service url, the service path is duplicated.
1 parent ffb8b9b commit 464f131

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Google/Service/Resource.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,13 @@ protected function convertToArrayAndStripNulls($o)
255255
*/
256256
public function createRequestUri($restPath, $params)
257257
{
258+
// Override the default servicePath address if the $restPath use a /
259+
if ('/' == substr($restPath, 0, 1)) {
260+
$requestUrl = substr($restPath, 1);
261+
} else {
262+
$requestUrl = $this->servicePath . $restPath;
263+
}
264+
258265
// code for leading slash
259266
$requestUrl = $this->servicePath . $restPath;
260267
if ($this->rootUrl) {

0 commit comments

Comments
 (0)