photo upload plugin size limit is not working, call photo_end hooks in any error return from mainline so html does not leak into json responses bug #77
This commit is contained in:
parent
0abf2f11c6
commit
db60d6d78f
1 changed files with 2 additions and 0 deletions
|
@ -562,6 +562,7 @@ foreach($_FILES AS $key => $val) {
|
||||||
if(($maximagesize) && ($filesize > $maximagesize)) {
|
if(($maximagesize) && ($filesize > $maximagesize)) {
|
||||||
notice( t('Image exceeds size limit of ') . $maximagesize . EOL);
|
notice( t('Image exceeds size limit of ') . $maximagesize . EOL);
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
call_hooks('photo_post_end',0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,6 +575,7 @@ foreach($_FILES AS $key => $val) {
|
||||||
logger('mod/photos.php: photos_post(): unable to process image' , 'LOGGER_DEBUG');
|
logger('mod/photos.php: photos_post(): unable to process image' , 'LOGGER_DEBUG');
|
||||||
notice( t('Unable to process image.') . EOL );
|
notice( t('Unable to process image.') . EOL );
|
||||||
@unlink($src);
|
@unlink($src);
|
||||||
|
call_hooks('photo_post_end',0);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue