Skip to content
Snippets Groups Projects
  1. Oct 21, 2016
  2. Sep 08, 2016
  3. Jul 21, 2016
  4. Jul 18, 2016
  5. Jul 08, 2016
  6. Jun 09, 2016
  7. Jun 02, 2016
  8. May 26, 2016
  9. May 25, 2016
  10. May 24, 2016
  11. May 20, 2016
  12. Apr 22, 2016
  13. Mar 07, 2016
  14. Mar 01, 2016
  15. Feb 09, 2016
  16. Feb 08, 2016
  17. Feb 03, 2016
  18. Feb 02, 2016
  19. Jan 28, 2016
  20. Jan 27, 2016
  21. Jan 20, 2016
  22. Jan 12, 2016
  23. Dec 14, 2015
  24. Dec 07, 2015
  25. Oct 26, 2015
  26. Oct 25, 2015
    • Lukas Reschke's avatar
      Throw exception on `getPath` if file does not exist · 13e817e9
      Lukas Reschke authored
      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.
      13e817e9
  27. Oct 08, 2015
Loading