Skip to content

Commit

Permalink
Fix bug with tracking new visitors
Browse files Browse the repository at this point in the history
  • Loading branch information
faf committed Sep 3, 2021
1 parent 944b0fe commit 7f133f1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/mibew/libs/track.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ function track_visit_page($visitor_id, $page)
array($visitor_id),
array('return_rows' => Database::RETURN_ONE_ROW)
);
if (is_bool($last_page)) {
return;
}
if ($last_page['address'] != $page) {
if (is_bool($last_page) || ($last_page['address'] != $page)) {
$db->query(
("INSERT INTO {visitedpage} ("
. "visitorid, address, visittime "
Expand Down

0 comments on commit 7f133f1

Please sign in to comment.