]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Notice.php
File::processNew now static and always throws exception on failure
[quix0rs-gnu-social.git] / classes / Notice.php
index 25422aa332d5b8ef6b421075f8e505aeaeff3899..f055096c33f4f22c7cc2c4c5cc5ea6465487c33e 100644 (file)
@@ -822,7 +822,11 @@ class Notice extends Managed_DataObject
         if (common_config('attachments', 'process_links')) {
             // @fixme validation?
             foreach (array_unique($urls) as $url) {
-                File::processNew($url, $this->id);
+                try {
+                    File::processNew($url, $this->id);
+                } catch (ServerException $e) {
+                    // Could not save URL. Log it?
+                }
             }
         }
     }
@@ -831,7 +835,11 @@ class Notice extends Managed_DataObject
      * @private callback
      */
     function saveUrl($url, $notice_id) {
-        File::processNew($url, $notice_id);
+        try {
+            File::processNew($url, $notice_id);
+        } catch (ServerException $e) {
+            // Could not save URL. Log it?
+        }
     }
 
     static function checkDupes($profile_id, $content) {