nextcloud/apps/files_trashbin
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
..
ajax update licence headers via script 2015-10-05 21:15:52 +02:00
appinfo Increase the 2nd digit of shipped apps 2015-10-17 08:47:11 +02:00
command update licence headers via script 2015-10-05 21:15:52 +02:00
css Revert "Revert "Move trashbin specific CSS that modifies sidebar"" 2015-10-12 16:21:27 +02:00
img introduce new app page layout 2014-10-15 15:21:40 +02:00
js Merge pull request #19647 from owncloud/trashbin-removesidebar 2015-10-14 12:50:46 +02:00
l10n [tx-robot] updated from transifex 2015-10-23 01:55:06 -04:00
lib Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00
templates fix checkbox in trashbin 2015-09-28 13:45:24 +02:00
tests Fix listing of trash files in test 2015-10-16 21:41:51 +02:00
list.php update license headers and authors 2015-06-25 14:13:49 +02:00