Skip to content

Commit

Permalink
[db-errors] fix typing of index exists db return value
Browse files Browse the repository at this point in the history
  • Loading branch information
lukadschaak committed Apr 22, 2024
1 parent bd1c039 commit 4e50762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/DataObject/ClassDefinition/Helper/Dao.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected function indexExists(string $table, string $prefix, mixed $indexName):
"SELECT COUNT(*) FROM information_schema.statistics WHERE table_name = '${table}' AND index_name = '${prefix}${indexName}' AND table_schema = DATABASE();"
);

return \count($exist) > 0 && '1' === $exist[0];
return (\count($exist) > 0) && (1 === $exist[0]);
}

protected function indexDoesNotExist(string $table, string $prefix, mixed $indexName): bool
Expand Down

0 comments on commit 4e50762

Please sign in to comment.