Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-838

Twig\FileSizeExtension::sizeFilter does not respect precision argument in some PHP environments

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.5.22, 3.3.7
    • 2.5.10, 4.0.x-dev, 3.3.6
    • Open Source
    • None
    • eZ Platform, Ibexa Open Source

    Description

      Kernel's Twig Extension FileSize formatter produces different results depending on PHP version and/or most likely version of the intl extension shipped with it.

      Exposed via \eZ\Publish\Core\MVC\Symfony\Templating\Tests\Twig\Extension\FileSizeExtensionTest

      Expected
      26.15126 MB wrong local so we take the default one which is en-GB here\n
      123.1231 MB wrong local so we take the default one which is en-GB here\n
      456.5 GB wrong local so we take the default one which is en-GB here\n
      789.78979 TB wrong local so we take the default one which is en-GB here\n
      789.7897897898 PB wrong local so we take the default one which is en-GB here\n
      789.79 EB wrong local so we take the default one which is en-GB here\n
      789789789.7898 EB wrong local so we take the default one which is en-GB here'
      
      Actual
      26 MB wrong local so we take the default one which is en-GB here\n
      123 MB wrong local so we take the default one which is en-GB here\n
      456 GB wrong local so we take the default one which is en-GB here\n
      790 TB wrong local so we take the default one which is en-GB here\n
      790 PB wrong local so we take the default one which is en-GB here\n
      790 EB wrong local so we take the default one which is en-GB here\n
      789789790 EB wrong local so we take the default one which is en-GB here'
      

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              andrew.longosz@ibexa.co Andrew Longosz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: