WSOD on file_exists open_basedir restriction

Created on 28 July 2022, almost 2 years ago
Updated 18 August 2023, 11 months ago

The check if certificates exists currently involves file_exists which can throw an WSOD making it impossible to change the values in the ui. It might be a good idea to catch exception like this and deal with them gracefully without causing WSOD.

πŸ› Bug report
Status

Fixed

Version

3.6

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Rudi Teschner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands roderik Amsterdam,NL / Budapest,HU

    I'm not going to revert this (because 'me finding additions of @ without clear reasoning' is not enough reason for that / the addition does nothing bad)... but still this has me wondering...

    • open_basedir restrictions don't cause WSODs or throw exceptions. They emit an E_WARNING.
    • standard Drupal does set_error_handler('_drupal_error_handler')
    • so it seems to me that your _drupal_error_handler() is throwing a fatal exception, or you've registered another error handler that's throwing one.
    • and... if an error handler causes a WSOD, shouldn't you be debugging/fixing that instead? Because it feels like now you can still get WSODs from E_WARNINGs being emitted elsewhere.

    In other words: this is fixing a symptom of a deeper problem on your system. The symptoms just don't occur that often (because Drupal code is quite good about not emitting E_WARNNGs / maybe the samlauth admin screen is the only place your system can get away with having a non-reachable file without being fatally impaired) - so you only see it on the samlauth admin screen. But still it feels like you shouldn't be trying to fix the symptom to suppress the deeper problem (as was done here).

Production build 0.69.0 2024