@@ -37,7 +37,8 @@ |
||
37 | 37 | foreach ($items as $identifier => $guid) { |
38 | 38 | try { |
39 | 39 | $results[$identifier] = new midcom_db_attachment($guid); |
40 | - } catch (midcom_error $e) { |
|
40 | + } |
|
41 | + catch (midcom_error $e) { |
|
41 | 42 | $e->log(); |
42 | 43 | } |
43 | 44 | } |
@@ -106,7 +106,8 @@ |
||
106 | 106 | try { |
107 | 107 | $object = new $options['widget_config']['class']($identifier); |
108 | 108 | $preset[$identifier] = \midcom_helper_datamanager2_widget_autocomplete::create_item_label($object, $options['widget_config']['result_headers'], $options['widget_config']['get_label_for']); |
109 | - } catch (midcom_error $e) { |
|
109 | + } |
|
110 | + catch (midcom_error $e) { |
|
110 | 111 | $e->log(); |
111 | 112 | } |
112 | 113 | } |
@@ -58,7 +58,8 @@ |
||
58 | 58 | |
59 | 59 | try { |
60 | 60 | return midcom::get()->dbfactory->get_object_by_guid($identifier); |
61 | - } catch (midcom_error $e) { |
|
61 | + } |
|
62 | + catch (midcom_error $e) { |
|
62 | 63 | $e->log(); |
63 | 64 | return false; |
64 | 65 | } |
@@ -218,7 +218,8 @@ |
||
218 | 218 | if ($this->_config->get('comments_topic')) { |
219 | 219 | try { |
220 | 220 | $comments_topic = new midcom_db_topic($this->_config->get('comments_topic')); |
221 | - } catch (midcom_error $e) { |
|
221 | + } |
|
222 | + catch (midcom_error $e) { |
|
222 | 223 | return false; |
223 | 224 | } |
224 | 225 |
@@ -65,7 +65,8 @@ discard block |
||
65 | 65 | { |
66 | 66 | try { |
67 | 67 | $invoice_sender = new midcom_db_person($invoicer); |
68 | - } catch (midcom_error $e) { |
|
68 | + } |
|
69 | + catch (midcom_error $e) { |
|
69 | 70 | return; |
70 | 71 | } |
71 | 72 | |
@@ -154,7 +155,8 @@ discard block |
||
154 | 155 | try { |
155 | 156 | $task = new org_openpsa_projects_task_dba($id); |
156 | 157 | $task->update_cache(); |
157 | - } catch (midcom_error $e) { |
|
158 | + } |
|
159 | + catch (midcom_error $e) { |
|
158 | 160 | } |
159 | 161 | } |
160 | 162 | |
@@ -285,7 +287,8 @@ discard block |
||
285 | 287 | } else { |
286 | 288 | $invoice_item->units = $deliverable->plannedUnits; |
287 | 289 | } |
288 | - } catch (midcom_error $e) { |
|
290 | + } |
|
291 | + catch (midcom_error $e) { |
|
289 | 292 | $e->log(); |
290 | 293 | $invoice_item->units = $hours; |
291 | 294 | } |
@@ -353,14 +356,16 @@ discard block |
||
353 | 356 | if (!empty($this->customer)) { |
354 | 357 | try { |
355 | 358 | return org_openpsa_contacts_group_dba::get_cached($this->customer); |
356 | - } catch (midcom_error $e) { |
|
359 | + } |
|
360 | + catch (midcom_error $e) { |
|
357 | 361 | $e->log(); |
358 | 362 | } |
359 | 363 | } |
360 | 364 | if (!empty($this->customerContact)) { |
361 | 365 | try { |
362 | 366 | return org_openpsa_contacts_person_dba::get_cached($this->customerContact); |
363 | - } catch (midcom_error $e) { |
|
367 | + } |
|
368 | + catch (midcom_error $e) { |
|
364 | 369 | $e->log(); |
365 | 370 | } |
366 | 371 | } |
@@ -77,7 +77,8 @@ discard block |
||
77 | 77 | // if the property useContactAddress is set |
78 | 78 | $billing_data[0]->set_address(); |
79 | 79 | return $billing_data[0]; |
80 | - } catch (midcom_error $e) { |
|
80 | + } |
|
81 | + catch (midcom_error $e) { |
|
81 | 82 | $e->log(); |
82 | 83 | return false; |
83 | 84 | } |
@@ -122,10 +123,12 @@ discard block |
||
122 | 123 | { |
123 | 124 | try { |
124 | 125 | return new org_openpsa_contacts_person_dba($this->linkGuid); |
125 | - } catch (midcom_error $e) { |
|
126 | + } |
|
127 | + catch (midcom_error $e) { |
|
126 | 128 | try { |
127 | 129 | return new org_openpsa_contacts_group_dba($this->linkGuid); |
128 | - } catch (midcom_error $e) { |
|
130 | + } |
|
131 | + catch (midcom_error $e) { |
|
129 | 132 | debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR); |
130 | 133 | return false; |
131 | 134 | } |
@@ -48,7 +48,8 @@ |
||
48 | 48 | try { |
49 | 49 | $pdf_helper->render_and_attach(); |
50 | 50 | return $this->reply(true, $this->_l10n->get('pdf created')); |
51 | - } catch (midcom_error $e) { |
|
51 | + } |
|
52 | + catch (midcom_error $e) { |
|
52 | 53 | return $this->reply(false, $this->_l10n->get('pdf creation failed') . ': ' . $e->getMessage()); |
53 | 54 | } |
54 | 55 | } |
@@ -152,8 +152,7 @@ |
||
152 | 152 | // Include each type |
153 | 153 | if ($type === 'people') { |
154 | 154 | $mc->add_constraint('uid.guid', 'IN', $selected); |
155 | - } |
|
156 | - else if ($type == 'groups') { |
|
155 | + } else if ($type == 'groups') { |
|
157 | 156 | if (!$join_added) { |
158 | 157 | $mc->get_doctrine()->leftJoin('midgard_member', 'm', Join::WITH, 'm.uid = c.uid'); |
159 | 158 | $mc->get_doctrine()->leftJoin('midgard_group', 'g', Join::WITH, 'g.id = m.gid'); |
@@ -35,7 +35,8 @@ discard block |
||
35 | 35 | // We're creating invoice for chosen customer |
36 | 36 | try { |
37 | 37 | $this->customer = new org_openpsa_contacts_group_dba($this->_master->_handler['args'][0]); |
38 | - } catch (midcom_error $e) { |
|
38 | + } |
|
39 | + catch (midcom_error $e) { |
|
39 | 40 | $this->contact = new org_openpsa_contacts_person_dba($this->_master->_handler['args'][0]); |
40 | 41 | } |
41 | 42 | } |
@@ -75,7 +76,8 @@ discard block |
||
75 | 76 | try { |
76 | 77 | $this->customer = org_openpsa_contacts_group_dba::get_cached($this->_object->customer); |
77 | 78 | $this->_populate_schema_contacts_for_customer($this->customer); |
78 | - } catch (midcom_error $e) { |
|
79 | + } |
|
80 | + catch (midcom_error $e) { |
|
79 | 81 | $fields['customer']['hidden'] = true; |
80 | 82 | $e->log(); |
81 | 83 | } |