killme();
}
- $src = "";
+ $src = '';
+ $filename = '';
+ $filesize = 0;
+ $filetype = '';
if (x($_FILES, 'userfile')) {
$src = $_FILES['userfile']['tmp_name'];
$filename = basename($_FILES['userfile']['name']);
$maximagesize = Config::get('system', 'maximagesize');
if (($maximagesize) && ($filesize > $maximagesize)) {
- $msg = sprintf(L10n::t('Image exceeds size limit of %s'), formatBytes($maximagesize));
+ $msg = L10n::t('Image exceeds size limit of %s', formatBytes($maximagesize));
if ($r_json) {
echo json_encode(['error'=>$msg]);
} else {
$width = $Image->getWidth();
$height = $Image->getHeight();
- $hash = photo_new_resource();
+ $hash = Photo::newResource();
$smallest = 0;