Passed
Branch master (f83f0c)
by Andreas
17:25
created
lib/midcom/helper/imagefilter.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -380,7 +380,8 @@  discard block
 block discarded – undo
380 380
         try {
381 381
             $cmd = midcom::get()->config->get('utility_imagemagick_base') . "identify " . escapeshellarg($filename);
382 382
             $this->_run_command($cmd);
383
-        } catch (midcom_error $e) {
383
+        }
384
+        catch (midcom_error $e) {
384 385
             return false;
385 386
         }
386 387
         return true;
@@ -406,7 +407,8 @@  discard block
 block discarded – undo
406 407
                 debug_add("EXIF information missing or without orientation tag. Skipping.", MIDCOM_LOG_INFO);
407 408
                 return;
408 409
             }
409
-        } catch (Exception $e) {
410
+        }
411
+        catch (Exception $e) {
410 412
             debug_add("Could not read EXIF data: " . $e->getMessage() . ", skipping.", MIDCOM_LOG_WARN);
411 413
             return;
412 414
         }
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/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/net/nemein/tag/handler.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -384,7 +384,8 @@  discard block
 block discarded – undo
384 384
                 $value = $link->value;
385 385
 
386 386
                 $tags[$key] = $value;
387
-            } catch (midcom_error $e) {
387
+            }
388
+            catch (midcom_error $e) {
388 389
                 $e->log();
389 390
             }
390 391
         }
@@ -443,7 +444,8 @@  discard block
 block discarded – undo
443 444
             try {
444 445
                 $tag = net_nemein_tag_tag_dba::get_cached($link->tag);
445 446
                 $link_object_map[$link->fromGuid][$tag->tag] = $link;
446
-            } catch (midcom_error $e) {
447
+            }
448
+            catch (midcom_error $e) {
447 449
                 $e->log();
448 450
             }
449 451
         }
@@ -472,7 +474,8 @@  discard block
 block discarded – undo
472 474
                     $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject);
473 475
                 }
474 476
                 $return[] = $tmpobject;
475
-            } catch (midcom_error $e) {
477
+            }
478
+            catch (midcom_error $e) {
476 479
                 $e->log();
477 480
             }
478 481
         }
Please login to merge, or discard this patch.
lib/net/nemein/redirector/viewer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,8 @@
 block discarded – undo
152 152
                     try {
153 153
                         $topic = new midcom_db_topic($id);
154 154
                         $id = $topic->id;
155
-                    } catch (midcom_error $e) {
155
+                    }
156
+                    catch (midcom_error $e) {
156 157
                         $e->log();
157 158
                         break;
158 159
                     }
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/feed.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@
 block discarded – undo
66 66
             try {
67 67
                 $author = new midcom_db_person($wikipage->metadata->revisor);
68 68
                 $item->author = $author->name;
69
-            } catch (midcom_error $e) {
69
+            }
70
+            catch (midcom_error $e) {
70 71
                 $e->log();
71 72
             }
72 73
 
Please login to merge, or discard this patch.