Skip to content

Commit

Permalink
Merge branch 'release/4.2.9'
Browse files Browse the repository at this point in the history
* release/4.2.9:
  updates the changelog
  typecast the referer url to avoid errors on null
  • Loading branch information
austintoddj committed Sep 20, 2019
2 parents 1b3ad47 + 76335df commit 7e36724
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## [Unreleased](https://github.com/cnvs/canvas/compare/master...develop)

## [4.2.9](https://github.com/cnvs/canvas/compare/v4.2.8...v4.2.9) (September 20, 2019)

## Fixed
- Patch for null referer URLs being passed in the view listener ([76e5fd6](https://github.com/cnvs/canvas/commit/76e5fd6aca480cda2455a195001babecf9e76b37))

## [4.2.8](https://github.com/cnvs/canvas/compare/v4.2.7...v4.2.8) (September 17, 2019)

## Added
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/StoreViewData.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function handle(PostViewed $event)
'post_id' => $event->post->id,
'ip' => request()->getClientIp(),
'agent' => request()->header('user_agent'),
'referer' => $this->validUrl(request()->header('referer')),
'referer' => $this->validUrl((string) request()->header('referer')),
];

$event->post->views()->create($view_data);
Expand Down

0 comments on commit 7e36724

Please sign in to comment.