1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Fix function call error in PagesVersions module hasPageVersions method

This commit is contained in:
Ryan Cramer
2025-03-16 10:00:40 -04:00
parent 4725ece5f8
commit 6783c4824b

View File

@@ -425,7 +425,7 @@ class PagesVersions extends Wire implements Module {
* *
*/ */
public function hasPageVersions(Page $page) { public function hasPageVersions(Page $page) {
$database = $this->wire()->database(); $database = $this->wire()->database;
$table = self::versionsTable; $table = self::versionsTable;
$sql = "SELECT COUNT(*) FROM $table WHERE pages_id=:pages_id"; $sql = "SELECT COUNT(*) FROM $table WHERE pages_id=:pages_id";
$query = $database->prepare($sql); $query = $database->prepare($sql);