Browse Source

Minz: support PHP8 lint (#3207)

* Minz: support PHP8 lint

Fix PHP8 Fatal error: Declaration of MinzPDO::query($statement) must be
compatible with PDO::query(string $query, ?int $fetch_mode = null, mixed
...$fetch_mode_args) in /FreshRSS/lib/Minz/ModelPdo.php on line 159
Errors parsing /FreshRSS/lib/Minz/ModelPdo.php

* Fix argument name

* Please phpcs in Travis
Alexandre Alapetite 5 years ago
parent
commit
2f88b26780
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/Minz/ModelPdo.php

+ 3 - 3
lib/Minz/ModelPdo.php

@@ -156,9 +156,9 @@ abstract class MinzPDO extends PDO {
 		return parent::exec($statement);
 		return parent::exec($statement);
 	}
 	}
 
 
-	public function query($statement) {
-		$statement = $this->preSql($statement);
-		return parent::query($statement);
+	public function query($query, $fetch_mode = null, ...$fetch_mode_args) {
+		$query = $this->preSql($query);
+		return $fetch_mode ? parent::query($query, $fetch_mode, ...$fetch_mode_args) : parent::query($query);
 	}
 	}
 }
 }