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

PHP 5.4 compliance : New $_SERVER['REQUEST_TIME'] format makes request date fail or at least inconsistent

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 4.7.0alpha1
    • 2011.10, 2011.11, 4.5.0, 4.6.0
    • None
    • Operating System:
      PHP Version: 5.4 RC4 (Apache 2 SAPI)
      Database and version:
      Browser (and version):

    Description

      Since PHP 5.4, $_SERVER['REQUEST_TIME'] includes microseconds, so it cannot be used any more directly with DateTime as it generates an exception :

      DateTime::__construct(): Failed to parse time string (@1324373290.765) at position 12 (7): Unexpected character
      

      This issue can be reproduced especially using REST as MvcTools uses REQUEST_TIME directly to construct the request date (see ezcMvcHttpRequestParser::processDate().

      Yes, this is an issue to be fixed in Zeta components, but this can be easily and safely workarounded in eZ Publish.

      Attachments

        Activity

          People

            jv@ez.no jv@ez.no
            jv@ez.no jv@ez.no
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: