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
This commit is contained in:
Brion Vibber 2009-12-15 13:05:05 -08:00
parent e2e1843639
commit 00fb5feff8
1 changed files with 4 additions and 3 deletions

View File

@ -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)) {