Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Commit 0a5b793

Browse files
committed
Merge pull request #360 from Loxo/4.0-dev
Fixed end() producing a ContextError when using E_STRICT mode
2 parents 0413e1c + a4d202d commit 0a5b793

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Facebook/FacebookRequest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ public function __construct(
218218
*/
219219
protected function getRequestURL()
220220
{
221-
$lastInPath = end(explode('/', $this->path));
221+
$pathElements = explode('/', $this->path);
222+
$lastInPath = end($pathElements);
222223
if ($lastInPath == 'videos' && $this->method === 'POST') {
223224
$baseUrl = static::BASE_VIDEO_GRAPH_URL;
224225
} else {

0 commit comments

Comments
 (0)