From c9a6fa7f9f62cc5a42ffc128babb5d5e3656c780 Mon Sep 17 00:00:00 2001 From: phpnut Date: Wed, 2 Apr 2008 18:36:19 +0000 Subject: [PATCH] "Fixes #4420, i18n does not parse .mo files on 64bit Mac" git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6622 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/i18n.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index 22f8cfd56..8580b36d0 100644 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -387,7 +387,7 @@ class I18n extends Object { $header = unpack("L1magic/L1version/L1count/L1o_msg/L1o_trn", $header); extract($header); - if (($magic == (-1794895138 & 0xFFFFFFFF) || $magic == (2500072158 & 0xFFFFFFFF)) && $version == 0) { + if ((dechex($magic) == '950412de' || dechex($magic) == 'ffffffff950412de') && $version == 0) { for ($n = 0; $n < $count; $n++) { $r = unpack("L1len/L1offs", substr($data, $o_msg + $n * 8, 8)); $msgid = substr($data, $r["offs"], $r["len"]); @@ -405,7 +405,7 @@ class I18n extends Object { $_this->__domains[$_this->category][$domain][$msgid] = $msgstr; if (isset($msgid_plural)) { - $_this->__domains[$_this->category][$domain][$msgid_plural] = &$_this->__domains[$_this->category][$domain][$msgid]; + $_this->__domains[$_this->category][$domain][$msgid_plural] =& $_this->__domains[$_this->category][$domain][$msgid]; } } }