From: Brion Vibber Date: Tue, 15 Dec 2009 21:05:05 +0000 (-0800) Subject: Cleanup undefined variable notice: set a couple more null defaults for new params... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=00fb5feff8f2552f63f1ddc7b1bef25ebd408507;p=quix0rs-gnu-social.git 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 --- diff --git a/classes/Notice.php b/classes/Notice.php index 01ed4e7f41..2205279e8f 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)) {