Permalink
Browse files

Show a broken image when diagram generation fails

  • Loading branch information...
1 parent 9af4fad commit 4660590a3d28f19a72fa57db1196ffba22a4b2a0 @splitbrain committed Jun 7, 2010
Showing with 2 additions and 1 deletion.
  1. BIN broken.png
  2. +2 −1 ditaa.php
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -33,7 +33,8 @@
// something went wrong, we're missing the file
if(!file_exists($cache)){
header("HTTP/1.0 404 Not Found");
- echo 'Not Found';
+ header('Content-Type: image/png');
+ echo io_readFile('broken.png',false);
exit;
}

0 comments on commit 4660590

Please sign in to comment.