Completed
Pull Request — master (#194)
by
unknown
15:06
created
lib/org/openpsa/projects/task.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -240,7 +240,8 @@  discard block
 block discarded – undo
240 240
                     $salesproject = org_openpsa_sales_salesproject_dba::get_cached($agreement->salesproject);
241 241
                     $this->customer = $salesproject->customer;
242 242
                 }
243
-            } catch (midcom_error $e) {
243
+            }
244
+            catch (midcom_error $e) {
244 245
             }
245 246
         } else {
246 247
             // No agreement, we can't be invoiceable
@@ -286,7 +287,8 @@  discard block
 block discarded – undo
286 287
         try {
287 288
             $agreement = new org_openpsa_sales_salesproject_deliverable_dba($this->get_agreement());
288 289
             $agreement->update_units($this->id, $hours);
289
-        } catch (midcom_error $e) {
290
+        }
291
+        catch (midcom_error $e) {
290 292
         }
291 293
 
292 294
         if ($update) {
@@ -313,7 +315,8 @@  discard block
 block discarded – undo
313 315
         try {
314 316
             $agreement = new org_openpsa_sales_salesproject_deliverable_dba($this->get_agreement());
315 317
             $invoice_approved_only = $agreement->invoiceApprovedOnly;
316
-        } catch (midcom_error $e) {
318
+        }
319
+        catch (midcom_error $e) {
317 320
             $invoice_approved_only = false;
318 321
         }
319 322
 
Please login to merge, or discard this patch.
lib/midcom/connection.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,8 @@
 block discarded – undo
132 132
 
133 133
         try {
134 134
             $user = new midgard_user($login_tokens);
135
-        } catch (mgd_exception $e) {
135
+        }
136
+        catch (mgd_exception $e) {
136 137
             return false;
137 138
         }
138 139
         if (!$trusted && !self::verify_password($password, $user->password)) {
Please login to merge, or discard this patch.
lib/midcom/core/user.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,8 @@  discard block
 block discarded – undo
182 182
             }
183 183
             try {
184 184
                 $this->_storage = new $person_class($id);
185
-            } catch (mgd_exception $e) {
185
+            }
186
+            catch (mgd_exception $e) {
186 187
                 debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
187 188
                 throw new midcom_error_midgard($e, $id);
188 189
             }
@@ -230,7 +231,8 @@  discard block
 block discarded – undo
230 231
         if (mgd_is_guid($id)) {
231 232
             try {
232 233
                 return new $person_class($id);
233
-            } catch (mgd_exception $e) {
234
+            }
235
+            catch (mgd_exception $e) {
234 236
                 debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
235 237
                 throw new midcom_error_midgard($e, $id);
236 238
             }
Please login to merge, or discard this patch.
lib/midcom/core/dbaobject.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@
 block discarded – undo
93 93
             try {
94 94
                 $mgdschemaclass = $this->__mgdschema_class_name__;
95 95
                 $this->__object = new $mgdschemaclass($id);
96
-            } catch (mgd_exception $e) {
96
+            }
97
+            catch (mgd_exception $e) {
97 98
                 debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN);
98 99
                 throw new midcom_error_midgard($e, $id);
99 100
             }
Please login to merge, or discard this patch.
lib/midcom/helper/_dbfactory.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@  discard block
 block discarded – undo
44 44
     {
45 45
         try {
46 46
             $tmp = midgard_object_class::get_object_by_guid($guid);
47
-        } catch (mgd_exception $e) {
47
+        }
48
+        catch (mgd_exception $e) {
48 49
             debug_add('Loading object by GUID ' . $guid . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_INFO);
49 50
 
50 51
             throw new midcom_error_midgard($e, $guid);
@@ -237,7 +238,8 @@  discard block
 block discarded – undo
237 238
                 $parent_data = [
238 239
                     $parent->__midcom_class_name__ => $parent_guid
239 240
                 ];
240
-            } catch (midcom_error $e) {
241
+            }
242
+            catch (midcom_error $e) {
241 243
                 $parent_data = [
242 244
                     '' => null
243 245
                 ];
@@ -251,7 +253,8 @@  discard block
 block discarded – undo
251 253
 
252 254
         try {
253 255
             return $this->get_cached($classname, $parent_guid);
254
-        } catch (midcom_error $e) {
256
+        }
257
+        catch (midcom_error $e) {
255 258
             return null;
256 259
         }
257 260
     }
@@ -310,7 +313,8 @@  discard block
 block discarded – undo
310 313
                 if ($the_object === null) {
311 314
                     try {
312 315
                         $the_object = $this->get_object_by_guid($object_guid);
313
-                    } catch (midcom_error $e) {
316
+                    }
317
+                    catch (midcom_error $e) {
314 318
                         return ['' => null];
315 319
                     }
316 320
                 }
Please login to merge, or discard this patch.
lib/midcom/core/group.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@
 block discarded – undo
94 94
             }
95 95
             try {
96 96
                 $this->_storage = new midgard_group($id);
97
-            } catch (Exception $e) {
97
+            }
98
+            catch (Exception $e) {
98 99
                 debug_add('Tried to load a midcom_core_group, but got error ' . $e->getMessage(), MIDCOM_LOG_ERROR);
99 100
                 debug_print_r('Passed argument was:', $id);
100 101
                 throw new midcom_error($e->getMessage());
Please login to merge, or discard this patch.
lib/org/openpsa/relatedto/exec/delete_dangling_links.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
     try {
28 28
         midcom::get()->dbfactory->get_object_by_guid($result->fromGuid);
29 29
         midcom::get()->dbfactory->get_object_by_guid($result->toGuid);
30
-    } catch (midcom_error $e) {
30
+    }
31
+    catch (midcom_error $e) {
31 32
         echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n";
32 33
         $result->delete();
33 34
     }
Please login to merge, or discard this patch.
lib/net/nemein/rss/cron/fetchfeeds.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
         foreach ($qb->execute() as $feed) {
29 29
             try {
30 30
                 midcom_db_topic::get_cached($feed->node);
31
-            } catch (midcom_error $e) {
31
+            }
32
+            catch (midcom_error $e) {
32 33
                 debug_add("Node #{$feed->node} does not exist, skipping feed #{$feed->id}", MIDCOM_LOG_ERROR);
33 34
                 continue;
34 35
             }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/midcom/interfaces.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
             foreach ($qb->execute() as $article) {
33 33
                 try {
34 34
                     $dm->set_storage($article);
35
-                } catch (midcom_error $e) {
35
+                }
36
+                catch (midcom_error $e) {
36 37
                     $e->log(MIDCOM_LOG_WARN);
37 38
                     continue;
38 39
                 }
Please login to merge, or discard this patch.