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

WordPress Trac noreply at wordpress.org
Mon Mar 4 07:32:59 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:
--------------------------+-------------------------

Comment (by tmatsuur):

 I was a little mistaken. The constant declarations do not seem to need to
 be changed.

 {{{
 const MAGIC_MARKER = 0x950412de;

 :

 protected function detect_endian_and_validate_file( string $header ) {

 :

         if ( (int) self::MAGIC_MARKER === $big ) {
                 return 'N';
         }

         if ( (int) self::MAGIC_MARKER === $little ) {
                 return 'V';
         }
 }}}

 The above changes solved the problem.

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


More information about the wp-trac mailing list