]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Cleanup undefined variable notice: set a couple more null defaults for new params...
authorBrion Vibber <brion@pobox.com>
Tue, 15 Dec 2009 21:05:05 +0000 (13:05 -0800)
committerBrion Vibber <brion@pobox.com>
Wed, 16 Dec 2009 14:27:48 +0000 (09:27 -0500)
Fixes this notice seen while using AJAX repeat button:
Notice: Undefined variable: uri in classes/Notice.php on line 243

classes/Notice.php

index 01ed4e7f41a7c99cf30868c85608491bb7c344b1..2205279e8f84229337b43b04dbd3337d3cf3be09 100644 (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)) {