magic byteorder detection fails on 64 bit

Bug #473346 reported by Christian Weiske
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
php-gettext
Fix Released
High
Данило Шеган

Bug Description

The magic byteorder detection in gettext.php#gettext_reader() fails on 64 bit systems.
The following patch fixes it for me on amd64:
http://source.ibiblio.org/trac/lyceum/attachment/ticket/652/gettext-64bit-fix.diff

Related branches

Revision history for this message
Данило Шеган (danilo) wrote :

I'll be looking into it tonight (to confirm, and to make sure it still works on 32-bit systems). Thanks for the bug report and a patch.

Changed in php-gettext:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Данило Шеган (danilo)
Revision history for this message
Данило Шеган (danilo) wrote :

So, I decided to actually use string comparison in this case, since these two lines of code have seen so many changes with different architectures and PHP versions. Can you please try out the latest code from trunk (you can get it with "bzr branch lp:php-gettext") and see if it works for you? I am also hoping this will fix bug #482513.

Changed in php-gettext:
status: Triaged → Fix Committed
Revision history for this message
Данило Шеган (danilo) wrote :

Fixed in lp:php-gettext r20

Revision history for this message
Christian Weiske (cweiske) wrote :

Works for me on 64bit.

Revision history for this message
Данило Шеган (danilo) wrote :

Cool, thanks! I'll roll out a release soon with this fix at least.

Changed in php-gettext:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.