diff options
author | Friendika <info@friendika.com> | 2011-06-28 18:59:41 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-28 18:59:41 -0700 |
commit | 4ca6a9a38257a8f8c82842ce734ae946b90ebb4c (patch) | |
tree | 42942a9bcba6c5745721bcad59cb584fcae9ef99 | |
parent | 0a6b4c93fe84a216cafd7123b5586cb42aa786fb (diff) | |
download | volse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.tar.gz volse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.tar.bz2 volse-hubzilla-4ca6a9a38257a8f8c82842ce734ae946b90ebb4c.zip |
dbg info for photo uploads
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | mod/photos.php | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -4,7 +4,7 @@ set_time_limit(0); ini_set('pcre.backtrack_limit', 250000); -define ( 'FRIENDIKA_VERSION', '2.2.1024' ); +define ( 'FRIENDIKA_VERSION', '2.2.1025' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DB_UPDATE_VERSION', 1070 ); 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); |