Skip to content

Commit b51202a

Browse files
geecuGunther Konig
andauthored
Fix doctrine ORM 3.0+ compatibility (#467)
Co-authored-by: Gunther Konig <gunther.konig@webflow.ro>
1 parent 94de608 commit b51202a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Entity/TransUnitRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getTransUnitList(array $locales = null, $rows = 20, $page = 1, a
113113
*
114114
* @return int
115115
*/
116-
public function count(array $locales = null, array $filters = null)
116+
public function count(array $locales = null, array $filters = null): int
117117
{
118118
$this->loadCustomHydrator();
119119

Util/Doctrine/SingleColumnArrayHydrator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ protected function hydrateAllData()
1818
{
1919
$result = [];
2020

21-
while ($data = $this->_stmt->fetchNumeric()) {
21+
$stmt = $this->_stmt ?? $this->stmt;
22+
23+
while ($data = $stmt->fetchNumeric()) {
2224
$value = $data[0];
2325

2426
if (is_numeric($value)) {

0 commit comments

Comments
 (0)