summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2009-12-15 13:05:05 -0800
committerBrion Vibber <brion@pobox.com>2009-12-16 09:27:48 -0500
commit00fb5feff8f2552f63f1ddc7b1bef25ebd408507 (patch)
tree252f2684a80e9816fe71dd14ce691e5330b344f7 /classes/Notice.php
parente2e184363962b10ddbcd6f04d28f83d92ba67b7c (diff)
Cleanup undefined variable notice: set a couple more null defaults for new params in Notice::saveNew().
Fixes this notice seen while using AJAX repeat button: Notice: Undefined variable: uri in classes/Notice.php on line 243
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 01ed4e7f4..2205279e8 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -176,12 +176,13 @@ class Notice extends Memcached_DataObject
}
static function saveNew($profile_id, $content, $source, $options=null) {
+ $defaults = array('uri' => null,
+ 'reply_to' => null,
+ 'repeat_of' => null);
if (!empty($options)) {
+ $options = $options + $defaults;
extract($options);
- if (!isset($reply_to)) {
- $reply_to = NULL;
- }
}
if (empty($is_local)) {