From 8d2ad63ce7119195307b7ee381b6a38a8a3b7bdb Mon Sep 17 00:00:00 2001 From: matjazpotocnik Date: Sun, 5 Jan 2025 11:48:54 -0500 Subject: [PATCH] Fix issue processwire/processwire-issues#1916 --- wire/modules/PagePathHistory.module | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wire/modules/PagePathHistory.module b/wire/modules/PagePathHistory.module index 1ffdeeaa..ca59d1d5 100644 --- a/wire/modules/PagePathHistory.module +++ b/wire/modules/PagePathHistory.module @@ -639,14 +639,13 @@ class PagePathHistory extends WireData implements Module, ConfigurableModule { } $query->execute(); $rowCount = $query->rowCount(); - $query->closeCursor(); } catch(\Exception $e) { if(!$this->checkTableSchema()) throw $e; $rowCount = 0; $query = null; } - if(!$rowCount || $query) return $result; + if(!$rowCount || !$query) return $result; $rows = array(); $pathCounts = array();