Test Setup Failed
Pull Request — master (#190)
by
unknown
12:55 queued 03:21
created
lib/midcom/core/user.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,8 @@  discard block
 block discarded – undo
180 180
             }
181 181
             try {
182 182
                 $this->_storage = new $person_class($id);
183
-            } catch (midgard_error_exception $e) {
183
+            }
184
+            catch (midgard_error_exception $e) {
184 185
                 debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
185 186
                 throw new midcom_error_midgard($e, $id);
186 187
             }
@@ -228,7 +229,8 @@  discard block
 block discarded – undo
228 229
         if (mgd_is_guid($id)) {
229 230
             try {
230 231
                 return new $person_class($id);
231
-            } catch (midgard_error_exception $e) {
232
+            }
233
+            catch (midgard_error_exception $e) {
232 234
                 debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
233 235
                 throw new midcom_error_midgard($e, $id);
234 236
             }
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
@@ -98,7 +98,8 @@
 block discarded – undo
98 98
             try {
99 99
                 $mgdschemaclass = $this->__mgdschema_class_name__;
100 100
                 $this->__object = new $mgdschemaclass($id);
101
-            } catch (midgard_error_exception $e) {
101
+            }
102
+            catch (midgard_error_exception $e) {
102 103
                 debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN);
103 104
                 throw new midcom_error_midgard($e, $id);
104 105
             }
Please login to merge, or discard this patch.
lib/midcom/services/rcs/backend/rcs.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -453,7 +453,8 @@  discard block
 block discarded – undo
453 453
 
454 454
         try {
455 455
             @exec($command, $output, $status);
456
-        } catch (Exception $e) {
456
+        }
457
+        catch (Exception $e) {
457 458
             debug_add($e->getMessage());
458 459
         }
459 460
 
@@ -549,7 +550,8 @@  discard block
 block discarded – undo
549 550
 
550 551
         try {
551 552
             $object = midcom::get()->dbfactory->get_object_by_guid($this->_guid);
552
-        } catch (midcom_error $e) {
553
+        }
554
+        catch (midcom_error $e) {
553 555
             debug_add("{$this->_guid} could not be resolved to object", MIDCOM_LOG_ERROR);
554 556
             return false;
555 557
         }
Please login to merge, or discard this patch.
lib/midcom/services/auth/main.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -787,7 +787,8 @@  discard block
 block discarded – undo
787 787
                     $param = $param->__object;
788 788
                 }
789 789
                 $this->_user_cache[$id] = new midcom_core_user($param);
790
-            } catch (midcom_error $e) {
790
+            }
791
+            catch (midcom_error $e) {
791 792
                 // Keep it silent while missing user object can mess here
792 793
                 $this->_user_cache[$id] = false;
793 794
             }
@@ -849,7 +850,8 @@  discard block
 block discarded – undo
849 850
             $tmp = new midcom_core_group($id);
850 851
             $id = $tmp->id;
851 852
             $this->_group_cache[$id] = $tmp;
852
-        } catch (midcom_error $e) {
853
+        }
854
+        catch (midcom_error $e) {
853 855
             $this->_group_cache[$id] = false;
854 856
             debug_add("Group with identifier {$id} could not be loaded: " . $e->getMessage(), MIDCOM_LOG_WARN);
855 857
         }
Please login to merge, or discard this patch.
lib/midcom/services/indexer/main.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -135,7 +135,8 @@  discard block
 block discarded – undo
135 135
 
136 136
         try {
137 137
             return $this->_backend->index($documents);
138
-        } catch (Exception $e) {
138
+        }
139
+        catch (Exception $e) {
139 140
             debug_add("Indexing error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
140 141
             return false;
141 142
         }
@@ -175,7 +176,8 @@  discard block
 block discarded – undo
175 176
         }
176 177
         try {
177 178
             return $this->_backend->delete($RIs);
178
-        } catch (Exception $e) {
179
+        }
180
+        catch (Exception $e) {
179 181
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
180 182
             return false;
181 183
         }
@@ -196,7 +198,8 @@  discard block
 block discarded – undo
196 198
 
197 199
         try {
198 200
             return $this->_backend->delete_all($constraint);
199
-        } catch (Exception $e) {
201
+        }
202
+        catch (Exception $e) {
200 203
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
201 204
             return false;
202 205
         }
@@ -230,7 +233,8 @@  discard block
 block discarded – undo
230 233
 
231 234
         try {
232 235
             $result_raw = $this->_backend->query($query, $filter, $options);
233
-        } catch (Exception $e) {
236
+        }
237
+        catch (Exception $e) {
234 238
             debug_add("Query error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
235 239
             return false;
236 240
         }
@@ -256,7 +260,8 @@  discard block
 block discarded – undo
256 260
             if (!empty($document->topic_guid)) {
257 261
                 try {
258 262
                     midcom_db_topic::get_cached($document->topic_guid);
259
-                } catch (midcom_error $e) {
263
+                }
264
+                catch (midcom_error $e) {
260 265
                     // Skip document, the object is hidden.
261 266
                     debug_add("Skipping the generic document {$document->title}, its topic seems to be invisible, we cannot proceed.");
262 267
                     continue;
@@ -269,7 +274,8 @@  discard block
 block discarded – undo
269 274
                 // Strip language code from end of RI if it looks like "<GUID>_<LANG>"
270 275
                 try {
271 276
                     midcom::get()->dbfactory->get_object_by_guid(preg_replace('/^([0-9a-f]{32,80})_[a-z]{2}$/', '\\1', $document->RI));
272
-                } catch (midcom_error $e) {
277
+                }
278
+                catch (midcom_error $e) {
273 279
                     // Skip document, the object is hidden, deleted or otherwise unavailable.
274 280
                     //@todo Maybe nonexistent objects should be removed from index?
275 281
                     continue;
Please login to merge, or discard this patch.
lib/midcom/baseclasses/core/dbobject.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -735,7 +735,8 @@
 block discarded – undo
735 735
          */
736 736
         try {
737 737
             return $object->get_by_id($object->id);
738
-        } catch (exception $e) {
738
+        }
739
+        catch (exception $e) {
739 740
             return false;
740 741
         }
741 742
     }
Please login to merge, or discard this patch.
lib/midcom/baseclasses/components/handler/rest.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,8 @@  discard block
 block discarded – undo
138 138
         try {
139 139
             $this->_object = new $classname($this->_id);
140 140
             return $this->_object;
141
-        } catch (Exception $e) {
141
+        }
142
+        catch (Exception $e) {
142 143
             $this->_stop($e->getMessage(), $e->getCode());
143 144
         }
144 145
     }
@@ -211,7 +212,8 @@  discard block
 block discarded – undo
211 212
             if (is_null($this->_response)) {
212 213
                 $this->_stop('Could not handle request, unknown method', 405);
213 214
             }
214
-        } catch (midcom_error $e) {
215
+        }
216
+        catch (midcom_error $e) {
215 217
             $this->_responseStatus = $e->getCode();
216 218
             return $this->_send_response($e->getMessage());
217 219
         }
Please login to merge, or discard this patch.
lib/midcom/helper/_styleloader.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,8 @@  discard block
 block discarded – undo
166 166
                     break;
167 167
                 }
168 168
             }
169
-        } catch (midcom_error $e) {
169
+        }
170
+        catch (midcom_error $e) {
170 171
         }
171 172
 
172 173
         $path_parts = array_reverse($path_parts);
@@ -410,7 +411,8 @@  discard block
 block discarded – undo
410 411
                 && $db_style = $this->get_style_id_from_path($root_topic->style)) {
411 412
                 $_style = $this->_get_element_in_styletree($db_style, $_element);
412 413
             }
413
-        } catch (midcom_error_forbidden $e) {
414
+        }
415
+        catch (midcom_error_forbidden $e) {
414 416
             $e->log();
415 417
         }
416 418
 
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/handler/object/manage.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@  discard block
 block discarded – undo
64 64
     {
65 65
         try {
66 66
             $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid);
67
-        } catch (midcom_error $e) {
67
+        }
68
+        catch (midcom_error $e) {
68 69
             if (midcom_connection::get_error() == MGD_ERR_OBJECT_DELETED) {
69 70
                 $relocate = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX) . '__mfa/asgard/object/deleted/' . $guid . '/';
70 71
                 midcom::get()->relocate($relocate);
@@ -232,8 +233,7 @@  discard block
 block discarded – undo
232 233
         $this->_new_object = new $create_type();
233 234
         $mgd_type = midcom::get()->dbclassloader->get_mgdschema_class_name_for_midcom_class($create_type);
234 235
 
235
-        if ($parent_property = midgard_object_class::get_property_parent($mgd_type))
236
-        {
236
+        if ($parent_property = midgard_object_class::get_property_parent($mgd_type)) {
237 237
             $this->_new_object->$parent_property = $controller->formmanager->get_value($parent_property);
238 238
         }
239 239
 
Please login to merge, or discard this patch.