Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-13055

eZURLAliasML::setLangMaskAlwaysAvailable() has incorrect bit-logic

    XMLWordPrintable

Details

    Description

      The code for unsetting bit 0 is not done correctly in the code

      Currently, the code looks like this:

      $bitOp = $db->bitOr( 'lang_mask', -2 );
      

      It should instead, be of this form:

      $bitOp = $db->bitAnd( 'lang_mask', ~1 );
      

      In addition the integers are written both as ~1 and -2, that normal form and two's complement form are being mixed inside one function.

      Attachments

        Activity

          People

            oms Ole Marius Smestad
            oms Ole Marius Smestad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: