fix(OC_Template.php): ensure we throw all errors#40763
fix(OC_Template.php): ensure we throw all errors#40763Psycojoker wants to merge 1 commit intonextcloud:masterfrom
Conversation
In one branch of the try/catch combination, in one specific path no error was thrown at all, thus the user ended up with a 500 error page online but absolutely no error anyway in the logs. Signed-off-by: Bram <[email protected]>
|
Hello, Do you want unit/other tests for this quick fix? I honestly would have absolutely no idea on how to do them, I have nearly 0 experience in php (and especially not modern php). Kind regards and thx for this great software ❤️ |
|
If you reach line 316, that means no error occurred while logging the exception. |
Yes, I've looked at every possible log imaginable:
Adding those lines was the only possible way to get the logging of the exact error somewhere (the error was that nextcloud couldn't connect to the database because it was stopped) |
|
I assume we fixed that already for master/28 with #37458. |
|
Maybe it would be a good idea to still have a fallback in the case the logging system broke for whatever reason again? |
|
We no longer use OC_Template and the remaining functions are deprecated as of 32. |
Summary
In one branch of the try/catch combination, in one specific path no error was thrown at all, thus the user ended up with a 500 error page online but absolutely no error anyway in the logs.
Checklist
[ ] Screenshots before/after for front-end changes[ ] Backports requested where applicable (ex: critical bugfixes)