Skip to content
Browse files

Improving feedback for developer in case media view does not find the…

… specified file
  • Loading branch information...
lorenzo committed Oct 3, 2010
1 parent 0ba5023 commit d117300518f419a9ad5228e2244a44009b53185f
Showing with 4 additions and 1 deletion.
  1. +4 −1 cake/libs/view/media.php
@@ -55,7 +55,10 @@ function render() {
$path = APP . $path . $id;
if (!file_exists($path)) {
if (!is_file($path)) {
if (Configure::read('debug')) {
throw new NotFoundException(sprintf('The requested file %s was not found', $path));
throw new NotFoundException('The requested file was not found');

This comment has been minimized.

Copy link

markstory Oct 9, 2010


Couldn't you make the message the conditional part and only have the one throw?

This comment has been minimized.

Copy link

lorenzo Oct 9, 2010

Author Member

Good idea :)


0 comments on commit d117300

Please sign in to comment.
You can’t perform that action at this time.