10000 Dont call count on non countable object · symfony/symfony@635bccd · GitHub
[go: up one dir, main page]

Skip to content

Commit 635bccd

Browse files
committed
Dont call count on non countable object
1 parent 9fc9cc4 commit 635bccd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function format(MessageCatalogue $messages, $domain = 'messages')
5252

5353
$resOffset = $this->getPosition($data);
5454

55-
$data .= pack('v', count($messages))
55+
$data .= pack('v', count($messages->all($domain)))
5656
.$indexes
5757
.$this->writePadding($data)
5858
.$resources
@@ -63,11 +63,11 @@ public function format(MessageCatalogue $messages, $domain = 'messages')
6363
$root = pack('V7',
6464
$resOffset + (2 << 28), // Resource Offset + Resource Type
6565
6, // Index length
66-
$keyTop, // Index keys top
67-
$bundleTop, // Index resources top
68-
$bundleTop, // Index bundle top
69-
count($messages), // Index max table length
70-
0 // Index attributes
66+
$keyTop, // Index keys top
67+
$bundleTop, // Index resources top
68+
$bundleTop, // Index bundle top
69+
count($messages->all($domain)), // Index max table length
70+
0 // Index attributes
7171
);
7272

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

0 commit comments

Comments
 (0)
0