mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
dbg info for photo uploads
This commit is contained in:
parent
0a6b4c93fe
commit
4ca6a9a382
2 changed files with 12 additions and 1 deletions
2
boot.php
2
boot.php
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue