Explorar o código

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 %!s(int64=5) %!d(string=hai) anos
pai
achega
2f88b26780
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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);
 	}
 
-	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);
 	}
 }