mirror of
https://github.com/friendica/friendica
synced 2024-11-10 01:42:53 +00:00
Fix exists() condition in DisposableFullTextSearch
This commit is contained in:
parent
50cc2be3d1
commit
391e41d6d6
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ class DisposableFullTextSearch
|
||||||
do {
|
do {
|
||||||
// Maximum value is indicated by the INT UNSIGNED type of the check-full-text-search.pid field
|
// Maximum value is indicated by the INT UNSIGNED type of the check-full-text-search.pid field
|
||||||
$this->identifier = random_int(0, pow(2, 32) - 1);
|
$this->identifier = random_int(0, pow(2, 32) - 1);
|
||||||
} while($this->db->exists('check-full-text-search', ['pid' => $this->identifier, 'searchtext' => $haystack]));
|
} while ($this->db->exists('check-full-text-search', ['pid' => $this->identifier]));
|
||||||
|
|
||||||
// If the `exists()` call fails and return false because the database is unavailable, the `insert()` call will likely fail as well, which means
|
// If the `exists()` call fails and return false because the database is unavailable, the `insert()` call will likely fail as well, which means
|
||||||
// all subsequent calls to `match()` will return false because the haystack won't have been inserted.
|
// all subsequent calls to `match()` will return false because the haystack won't have been inserted.
|
||||||
|
|
Loading…
Reference in a new issue