Skip to content

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
* 2.1:
  Added Base64 encoding, decoding to MongoDBProfilerStorage
  Fix duplicated code and a field name
  refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
  fixed typo
  Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
  fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
  [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
  added dirs generated by build-data.php in locale component to .gitignore
  [Process] Fixed bug introduced by 7bafc69f38a3512eb15aad506959a4e7be162e52.
  [Process][Tests] Prove process fail (Add more test case)
  [Process][Tests] Prove process fail
  [HttpFoundation] Fixed the tests
  [DomCrawler] Added test for supported encodings by mbstring
  [Config] Fixed preserving keys in associative arrays
  [Console] Fixed return value for Command::run
  [Locale] Fixed tests
  [Console] Fix some input tests
  [Filesystem] Fixed tests on Windows
  [Config] Fixed tests on Windows
  • Loading branch information
fabpot committed Jul 4, 2015
2 parents a9794b2 + 33cde03 commit 05dce7b
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions Loader/MoFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,13 @@ private function parse($resource)
throw new \InvalidArgumentException("MO stream content has an invalid format.");
}

$header = array(
'formatRevision' => null,
'count' => null,
'offsetId' => null,
'offsetTranslated' => null,
'sizeHashes' => null,
'offsetHashes' => null,
);
foreach ($header as &$value) {
$value = $this->readLong($stream, $isBigEndian);
}
extract($header);
$formatRevision = $this->readLong($stream, $isBigEndian);
$count = $this->readLong($stream, $isBigEndian);
$offsetId = $this->readLong($stream, $isBigEndian);
$offsetTranslated = $this->readLong($stream, $isBigEndian);
$sizeHashes = $this->readLong($stream, $isBigEndian);
$offsetHashes = $this->readLong($stream, $isBigEndian);

$messages = array();

for ($i = 0; $i < $count; $i++) {
Expand Down

0 comments on commit 05dce7b

Please sign in to comment.