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

Allowing kernel override in config.php may cause a Fatal Error (patch attached)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.1.3, 4.1.4, 4.2.0, 5.4.9
    • Fix Version/s: 5.4.10-rc
    • Component/s: Misc
    • Labels:
      None

      Description

      Since 4.1.0, it is possible to allow kernel override in config.php by setting EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE constant to true.
      The problem is that setting this constant will cause a Fatal Error if override autoload file has not yet been generated, as it does a require_once() statement of var/autoload/ezp_override.php without testing if it exists (in autoload.php)

      1. autoload.php.patch
        0.9 kB
        Jérôme Vieilledent

        Activity

        Hide
        Bertrand Dunogier added a comment -

        Patch attached ? Attaching patch failed

        Show
        Bertrand Dunogier added a comment - Patch attached ? Attaching patch failed
        Hide
        Jérôme Vieilledent added a comment -
        Show
        Jérôme Vieilledent added a comment - In reply to comment #050264 Ooops, sorry
        Hide
        Bertrand Dunogier added a comment -

        Fixed in trunk rev. 24514 (ezpublish 4.3.0alpha1), stable/4.2 rev. 24515.

        I've chosen to fix it by replacing the require with an include. This WILL throw a warning if the file's not found, but:

        • adding a file_exists call at that place is something I'd rather not do
        • if you enable kernel override without having kernel overrides... well, you do deserve a warning.
        Show
        Bertrand Dunogier added a comment - Fixed in trunk rev. 24514 (ezpublish 4.3.0alpha1), stable/4.2 rev. 24515. I've chosen to fix it by replacing the require with an include. This WILL throw a warning if the file's not found, but: adding a file_exists call at that place is something I'd rather not do if you enable kernel override without having kernel overrides... well, you do deserve a warning.
        Hide
        ezrobot added a comment -

        This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.

        Show
        ezrobot added a comment - This issue has been automatically closed due to the lack of activity over a long period of time. It is very likely that it is obsolete, but if you think it is still valid, do not hesitate to reopen it and mention why.
        Hide
        André Rømcke added a comment -

        Re opening since this is now causing issues in hybrid stack in some cases.

        Show
        André Rømcke added a comment - Re opening since this is now causing issues in hybrid stack in some cases.
        Show
        André Rømcke added a comment - Merged: https://github.com/ezsystems/ezpublish-legacy/commit/a5838bd04ea9442018bd6ff3001201bae71b600e
        Hide
        Rui Silva added a comment -

        Tested and approved by QA for 5.4.

        Show
        Rui Silva added a comment - Tested and approved by QA for 5.4.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jérôme Vieilledent
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: