Browse Source

Model: Query ':' types can reuse parameters

master
Riyyi 2 years ago
parent
commit
3b47e0ed71
  1. 2
      app/model/Model.php

2
app/model/Model.php

@ -98,7 +98,7 @@ abstract class Model {
protected static function query(string $query, array $parameters = [], protected static function query(string $query, array $parameters = [],
$type = ':'): ?array $type = ':'): ?array
{ {
if (substr_count($query, $type) != count($parameters)) { if ($type == '?' && substr_count($query, $type) != count($parameters)) {
return null; return null;
} }

Loading…
Cancel
Save