summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-18 17:19:28 -0700
committerBrion Vibber <brion@pobox.com>2010-03-18 17:19:28 -0700
commit3e2e88b0dfb0f5b3baa336a9b3f69e8e8244c8e6 (patch)
tree7de5edd8b9c74d5a29f7443b1a52a269f5f9d6e3 /actions
parent9c5af9a38f82afee92a78303aaa4604794ef6866 (diff)
parent01a1e882afeb78542b02e4643c5d8a2fa50c2206 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/apistatusesupdate.php16
-rw-r--r--actions/avatarsettings.php4
2 files changed, 15 insertions, 5 deletions
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index bf367e1e1..1956c8586 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -244,11 +244,17 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$options = array_merge($options, $locOptions);
}
- $this->notice =
- Notice::saveNew($this->auth_user->id,
- $content,
- $this->source,
- $options);
+ try {
+ $this->notice = Notice::saveNew(
+ $this->auth_user->id,
+ $content,
+ $this->source,
+ $options
+ );
+ } catch (Exception $e) {
+ $this->clientError($e->getMessage());
+ return;
+ }
if (isset($upload)) {
$upload->attachToNotice($this->notice);
diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php
index 6a7398746..d4ea11cb7 100644
--- a/actions/avatarsettings.php
+++ b/actions/avatarsettings.php
@@ -301,6 +301,10 @@ class AvatarsettingsAction extends AccountSettingsAction
$this->showForm($e->getMessage());
return;
}
+ if ($imagefile === null) {
+ $this->showForm(_('No file uploaded.'));
+ return;
+ }
$cur = common_current_user();