server/apps/files_sharing
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
api Throw exception on getPath if file does not exist 2015-10-25 17:58:21 +01:00
appinfo use correct class name 2015-10-20 08:18:53 +02:00
css Fix spinner positions in share tab 2015-10-16 15:54:27 +02:00
img fix look of 'Share with me via ownCloud' button, fix wording 2015-06-17 16:05:05 +02:00
js fix pagination on public file list 2015-10-20 16:11:10 +02:00
l10n [tx-robot] updated from transifex 2015-10-24 01:55:42 -04:00
lib Throw exception on getPath if file does not exist 2015-10-25 17:58:21 +01:00
templates Merge pull request #19733 from owncloud/remove-controls-whennotneeded 2015-10-14 12:37:55 +02:00
tests Throw exception on getPath if file does not exist 2015-10-25 17:58:21 +01:00
list.php update license headers and authors 2015-06-25 14:13:49 +02:00
public.php update licence headers via script 2015-10-05 21:15:52 +02:00
settings-admin.php Update license headers 2015-03-26 11:44:36 +01:00
settings-personal.php update licence headers via script 2015-10-05 21:15:52 +02:00