diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-13 01:52:34 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-13 01:52:34 +0400 |
commit | 0634fa4706e4feebcd5daac562f22f6037508293 (patch) | |
tree | e43a67c02756b9f9a0bd031d44a3e59d8e634033 /plugins/Actions/Columns | |
parent | c2d302ab9041af2dd93c249403f2d7966b2b97d0 (diff) |
this might fix some tests, I reckon exit_url and exit_name was sometimes set to 0 when false was returned
Diffstat (limited to 'plugins/Actions/Columns')
-rw-r--r-- | plugins/Actions/Columns/ExitPageTitle.php | 12 | ||||
-rw-r--r-- | plugins/Actions/Columns/ExitPageUrl.php | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/plugins/Actions/Columns/ExitPageTitle.php b/plugins/Actions/Columns/ExitPageTitle.php index 7890c49a09..ed2d7821dd 100644 --- a/plugins/Actions/Columns/ExitPageTitle.php +++ b/plugins/Actions/Columns/ExitPageTitle.php @@ -46,11 +46,17 @@ class ExitPageTitle extends VisitDimension public function onExistingVisit(Request $request, $visit, $action) { - if (!empty($action)) { - return (int) $action->getIdActionNameForEntryAndExitIds(); + if (empty($action)) { + return false; + } + + $id = $action->getIdActionNameForEntryAndExitIds(); + + if (!empty($id)) { + $id = (int) $id; } - return false; + return $id; } public function getName() diff --git a/plugins/Actions/Columns/ExitPageUrl.php b/plugins/Actions/Columns/ExitPageUrl.php index e8267dd537..ad3c21ec42 100644 --- a/plugins/Actions/Columns/ExitPageUrl.php +++ b/plugins/Actions/Columns/ExitPageUrl.php @@ -46,11 +46,17 @@ class ExitPageUrl extends VisitDimension public function onExistingVisit(Request $request, $visit, $action) { - if (!empty($action)) { - return (int) $action->getIdActionUrlForEntryAndExitIds(); + if (empty($action)) { + return false; + } + + $id = $action->getIdActionUrlForEntryAndExitIds(); + + if (!empty($id)) { + $id = (int) $id; } - return false; + return $id; } public function getName() |