20240406#2

This commit is contained in:
User
2024-04-06 01:43:19 +03:00
parent c681de9bfb
commit 6caceefc17
2 changed files with 3 additions and 2 deletions

View File

@@ -135,8 +135,9 @@ class MysqlStorage implements MysqlStorageInterface {
}
/** @inheritDoc */
public function findOne(string $sql) : array {
public function findOne(string $sql) : bool|array {
$result = $this->query($sql);
if (!$result || $result->num_rows == 0) return false;
$data = new MysqlStorageData($result);
return $data->fetchOne();
}

View File

@@ -86,7 +86,7 @@ interface MysqlStorageInterface {
* @param string $sql
* @return array
*/
public function findOne(string $sql) : array;
public function findOne(string $sql) : bool|array;
/**
* Метод экранирования данных с учетом текущего подключения в т.ч для LIKE