Show
Ignore:
Timestamp:
10/16/06 13:01:22 (2 years ago)
Author:
mbonetti
Message:

possible fix for gettext magic number on PHP4

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/extlib/l10n/gettext.php

    r1479 r1608  
    103103    $this->enable_cache = $enable_cache; 
    104104 
    105     // $MAGIC1 = (int)0x950412de; //bug in PHP 5 
     105    $MAGIC1_alt = (int)0x950412de; //bug in PHP 5 
    106106    $MAGIC1 = (int) - 1794895138; 
    107     // $MAGIC2 = (int)0xde120495; //bug 
     107    $MAGIC2_alt = (int)0xde120495; //bug 
    108108    $MAGIC2 = (int) - 569244523; 
    109109 
    110110    $this->STREAM = $Reader; 
    111111    $magic = $this->readint(); 
    112     if ($magic == $MAGIC1) { 
     112    if ($magic == $MAGIC1 || $magic == $MAGIC1_alt) { 
    113113      $this->BYTEORDER = 0; 
    114     } elseif ($magic == $MAGIC2) { 
     114    } elseif ($magic == $MAGIC2 || $magic == $MAGIC2_alt) { 
    115115      $this->BYTEORDER = 1; 
    116116    } else {