function wall_attach_post(App $a) {
- $r_json = (x($_GET,'response') && $_GET['response']=='json');
+ $r_json = (!empty($_GET['response']) && $_GET['response']=='json');
if ($a->argc > 1) {
$nick = $a->argv[1];
killme();
}
- if (! x($_FILES,'userfile')) {
+ if (empty($_FILES['userfile'])) {
if ($r_json) {
echo json_encode(['error' => L10n::t('Invalid request.')]);
}
if ($r_json) {
echo json_encode(['error' => $msg]);
} else {
- echo $msg . EOL ;
+ echo $msg . EOL;
}
@unlink($src);
killme();
if ($r_json) {
echo json_encode(['error' => $msg]);
} else {
- echo $msg . EOL ;
+ echo $msg . EOL;
}
killme();
}
if ($r_json) {
echo json_encode(['error' => $msg]);
} else {
- echo $msg . EOL ;
+ echo $msg . EOL;
}
killme();
}