Closed bennyborn closed 6 years ago
Shouln't you get the exception message in that case?
I guess, but it seems that this exception is already handled elsewhere and not passed through to the frontend.
The problem is that parse_ini_file()
returns null
in this case. And the PHP warning will only be shown once when the container is built and then never again.
Fixed in 546e28ad1b69e1ba3121289b0a3862541348f47d.
The documentation says something else?
The settings are returned as an associative array on success, and FALSE on failure.
¯\(ツ)/¯
I have tested it and it was null
.
What the documentation says is the behaviour of the function itself.
If the function is disabled at all I'm pretty sure the behaviour is different e.g. returning null
like Leo said.
That's funny. I would assume a different exception if the method does not exists at all, but maybe this is just our beloved PHP magic 😂
I just deployed a new installation on a hosting where the function
parse_ini_file
was disabled by default for security reasons. This causes quite some trouble since allautoload.ini
files are ignored and the order in which dependencies are loaded are not resolved correctly.Even though the IniParser throws a RuntimeException the user never gets any notification that there was a serious error. This should at least create an entry in the logs to make debugging of such scenarios much easier - it cost my quite some time to figure it out :\
https://github.com/contao/manager-plugin/blob/24afc56e4dad5c0ed73b97d7d94905e03c45bbdf/src/Bundle/Parser/IniParser.php#L104-L108