Skip to content
Snippets Groups Projects
Commit fe73457f authored by Eduarda Lentz Rodrigues da Silva's avatar Eduarda Lentz Rodrigues da Silva
Browse files

ZERO-162 Fix static test

parent b622029b
No related branches found
No related tags found
1 merge request!46ZERO-162-changes
Pipeline #92296 passed
...@@ -48,12 +48,8 @@ class CmsBlockRepository implements CmsBlockRepositoryInterface ...@@ -48,12 +48,8 @@ class CmsBlockRepository implements CmsBlockRepositoryInterface
public function getByTitle(string $title): array public function getByTitle(string $title): array
{ {
$connection = $this->resource->getConnection(); $connection = $this->resource->getConnection();
$tableName = $this->resource->getTableName(self::CMS_BLOCK_TABLE_NAME); $select = $connection->select()->from(self::CMS_BLOCK_TABLE_NAME)->where('title = :', $title);
$sqlQuery = "SELECT * FROM $tableName WHERE title = :title"; return $connection->fetchRow($select);
$bind = ['title' => $title];
$result = $connection->fetchRow($sqlQuery, $bind);
return $result ?: [];
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment