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:
parent
e2e1843639
commit
00fb5feff8
|
@ -176,12 +176,13 @@ class Notice extends Memcached_DataObject
|
||||||
}
|
}
|
||||||
|
|
||||||
static function saveNew($profile_id, $content, $source, $options=null) {
|
static function saveNew($profile_id, $content, $source, $options=null) {
|
||||||
|
$defaults = array('uri' => null,
|
||||||
|
'reply_to' => null,
|
||||||
|
'repeat_of' => null);
|
||||||
|
|
||||||
if (!empty($options)) {
|
if (!empty($options)) {
|
||||||
|
$options = $options + $defaults;
|
||||||
extract($options);
|
extract($options);
|
||||||
if (!isset($reply_to)) {
|
|
||||||
$reply_to = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($is_local)) {
|
if (empty($is_local)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user