Skip to content

Commit a89af88

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [TwigBundle] add back exception check Dont call count on non countable object
2 parents 44f7950 + d52cb24 commit a89af88

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dumper/IcuResFileDumper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
6262

6363
$resOffset = $this->getPosition($data);
6464

65-
$data .= pack('v', count($messages))
65+
$data .= pack('v', count($messages->all($domain)))
6666
.$indexes
6767
.$this->writePadding($data)
6868
.$resources
@@ -73,11 +73,11 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
7373
$root = pack('V7',
7474
$resOffset + (2 << 28), // Resource Offset + Resource Type
7575
6, // Index length
76-
$keyTop, // Index keys top
77-
$bundleTop, // Index resources top
78-
$bundleTop, // Index bundle top
79-
count($messages), // Index max table length
80-
0 // Index attributes
76+
$keyTop, // Index keys top
77+
$bundleTop, // Index resources top
78+
$bundleTop, // Index bundle top
79+
count($messages->all($domain)), // Index max table length
80+
0 // Index attributes
8181
);
8282

8383
$header = pack('vC2v4C12@32',

0 commit comments

Comments
 (0)