-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
Fixed missing forward slash between version number and the rest of the URL.
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Paths are provided with the root |
Ahh. My bad! Added a check for a leading |
@@ -225,7 +225,8 @@ protected function getRequestURL() | |||
} else { | |||
$baseUrl = static::BASE_GRAPH_URL; | |||
} | |||
return $baseUrl . '/' . $this->version . $this->path; | |||
$normalizedPath = ($this->path[0] == '/') ? $this->path : '/' . $this->path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return $baseUrl . '/' . $this->version . '/' . ltrim($this->path, '/');
Thanks yguedidi - Much neater! :-) |
You're welcome :) |
Fixed missing forward slash between version number and the rest of the URL.