[wp-trac] [WordPress Trac] #60678: Definition of WP_Translation_File_MO::MAGIC_MARKER

WordPress Trac noreply at wordpress.org
Sun Mar 3 17:43:02 UTC 2024


#60678: Definition of WP_Translation_File_MO::MAGIC_MARKER
--------------------------+-------------------------
 Reporter:  tmatsuur      |       Owner:  swissspidy
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  6.5
Component:  I18N          |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-------------------------
Changes (by swissspidy):

 * keywords:   => needs-patch


Comment:

 Thanks for your report!

 Looks like a 32 bit vs 64 bit issue, which explains why this wasn't
 spotted before.

 On https://3v4l.org/ you can notice it in the live preview, which is x86.
 There it will be a float. But as soon as you press `eval();`, it will be
 an int.

 The workaround looks reasonable at first glance. Just noting that the
 magic marker is also used in the `export()` method, so that needs to be
 checked as well.

 Another solution can be seen in the `\MO::get_byteorder()` method, where
 it's simply an integer.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60678#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list