use Friendica\Util\DateTimeFormat;
use Friendica\Util\Map;
use Friendica\Util\Security;
-use Friendica\Util\Temporal;
use Friendica\Util\Strings;
+use Friendica\Util\Temporal;
use Friendica\Util\XML;
function photos_init(App $a) {
$str_group_deny = !empty($_POST['group_deny']) ? perms2str($_POST['group_deny']) : '';
$str_contact_deny = !empty($_POST['contact_deny']) ? perms2str($_POST['contact_deny']) : '';
- $resource_id = $a->argv[2];
+ $resource_id = $a->argv[3];
if (!strlen($albname)) {
$albname = DateTimeFormat::localNow('Y');
if ($item_id) {
$item = Item::selectFirst(['tag', 'inform'], ['id' => $item_id, 'uid' => $page_owner_uid]);
- }
- if (DBA::isResult($item)) {
- $old_tag = $item['tag'];
- $old_inform = $item['inform'];
+
+ if (DBA::isResult($item)) {
+ $old_tag = $item['tag'];
+ $old_inform = $item['inform'];
+ }
}
if (strlen($rawtags)) {
}
}
- $newtag = $old_tag;
+ $newtag = $old_tag ?? '';
if (strlen($newtag) && strlen($str_tags)) {
$newtag .= ',';
}
$newtag .= $str_tags;
- $newinform = $old_inform;
+ $newinform = $old_inform ?? '';
if (strlen($newinform) && strlen($inform)) {
$newinform .= ',';
}
@unlink($src);
$foo = 0;
Hook::callAll('photo_post_end',$foo);
- exit();
+ return;
}
$exif = $image->orient($src);
if (!$r) {
Logger::log('mod/photos.php: photos_post(): image store failed', Logger::DEBUG);
notice(L10n::t('Image upload failed.') . EOL);
- exit();
+ return;
}
if ($width > 640 || $height > 640) {