Skip to content

Commit

Permalink
Stop error on php54.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyfrench committed May 11, 2016
1 parent ac3e3cd commit 2e7f8d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ScriptViewCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ public function __construct(GoogleTagManager $googleTagManager)
*/
public function create(View $view)
{
if ($this->googleTagManager->isEnabled() && empty($this->googleTagManager->id())) {
$id = $this->googleTagManager->id();
if ($this->googleTagManager->isEnabled() && empty($id)) {
throw new ApiKeyNotSetException();
}

$view
->with('enabled', $this->googleTagManager->isEnabled())
->with('id', $this->googleTagManager->id())
->with('id', $id)
->with('dataLayer', $this->googleTagManager->getDataLayer());
}
}

0 comments on commit 2e7f8d4

Please sign in to comment.