aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-28 18:59:41 -0700
committerFriendika <info@friendika.com>2011-06-28 18:59:41 -0700
commit4ca6a9a38257a8f8c82842ce734ae946b90ebb4c (patch)
tree42942a9bcba6c5745721bcad59cb584fcae9ef99 /mod/photos.php
parent0a6b4c93fe84a216cafd7123b5586cb42aa786fb (diff)
downloadvolse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.tar.gz
volse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.tar.bz2
volse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.zip
dbg info for photo uploads
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index bbdb8b7e9..28ed609b5 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -590,6 +590,9 @@ function photos_post(&$a) {
$filesize = intval($_FILES['userfile']['size']);
}
+
+ logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' ' . $filesize . ' bytes', LOGGER_DEBUG);
+
$maximagesize = get_config('system','maximagesize');
if(($maximagesize) && ($filesize > $maximagesize)) {
@@ -600,6 +603,14 @@ function photos_post(&$a) {
return;
}
+ if(! $filesize) {
+ notice( t('Image file is empty.') . EOL);
+ @unlink($src);
+ $foo = 0;
+ call_hooks('photo_post_end',$foo);
+ return;
+ }
+
logger('mod/photos.php: photos_post(): loading the contents of ' . $src , 'LOGGER_DEBUG');
$imagedata = @file_get_contents($src);