Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 23e6613

Browse files
authored
Merge pull request #7 from xphoenyx/develop
Fixed getting PhantomJs client
2 parents 7cbe702 + 1ec37c5 commit 23e6613

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PhantomJs.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ public function getContainer() : PhantomJsServiceContainer
118118
*/
119119
public function getClient() : Client
120120
{
121+
if (!$this->client) {
122+
$this->setClient();
123+
}
124+
121125
return $this->client;
122126
}
123127

@@ -302,4 +306,4 @@ public function send(RequestInterface $request, ResponseInterface $response = nu
302306
{
303307
return $this->getClient()->send($request, ( is_null($response) ? new Response : $response ) );
304308
}
305-
}
309+
}

0 commit comments

Comments
 (0)