@@ -138,7 +138,8 @@ |
||
138 | 138 | try { |
139 | 139 | $parent = new org_openpsa_projects_project($task->project); |
140 | 140 | $options['success_url'] = $this->router->generate('project', ['guid' => $parent->guid]); |
141 | - } catch (midcom_error $e) { |
|
141 | + } |
|
142 | + catch (midcom_error $e) { |
|
142 | 143 | $e->log(); |
143 | 144 | } |
144 | 145 |
@@ -36,7 +36,8 @@ discard block |
||
36 | 36 | // Add person to campaign |
37 | 37 | try { |
38 | 38 | $campaign = new org_openpsa_directmarketing_campaign_dba($add_to); |
39 | - } catch (midcom_error $e) { |
|
39 | + } |
|
40 | + catch (midcom_error $e) { |
|
40 | 41 | // FIXME: More informative error message |
41 | 42 | $this->notify('Failed adding person %s to campaign %s', $add_to, 'error'); |
42 | 43 | return; |
@@ -86,7 +87,8 @@ discard block |
||
86 | 87 | try { |
87 | 88 | $campaigns[$membership->campaign] = new org_openpsa_directmarketing_campaign_dba($membership->campaign); |
88 | 89 | $campaign_membership_map[$membership->campaign] = $membership; |
89 | - } catch (midcom_error $e) { |
|
90 | + } |
|
91 | + catch (midcom_error $e) { |
|
90 | 92 | debug_add('Failed to load campaign ' . $membership->campaign . ', reason: ' . $e->getMessage()); |
91 | 93 | } |
92 | 94 | } |
@@ -48,7 +48,8 @@ discard block |
||
48 | 48 | // We're creating invoice for chosen customer |
49 | 49 | try { |
50 | 50 | $this->customer = new org_openpsa_contacts_group_dba($company); |
51 | - } catch (midcom_error $e) { |
|
51 | + } |
|
52 | + catch (midcom_error $e) { |
|
52 | 53 | $contact = new org_openpsa_contacts_person_dba($company); |
53 | 54 | $this->contact_id = $contact->id; |
54 | 55 | } |
@@ -155,7 +156,8 @@ discard block |
||
155 | 156 | if (!empty($this->invoice->customer)) { |
156 | 157 | try { |
157 | 158 | $this->customer = org_openpsa_contacts_group_dba::get_cached($this->invoice->customer); |
158 | - } catch (midcom_error $e) { |
|
159 | + } |
|
160 | + catch (midcom_error $e) { |
|
159 | 161 | $customer_field['hidden'] = true; |
160 | 162 | $e->log(); |
161 | 163 | } |
@@ -89,7 +89,8 @@ |
||
89 | 89 | } elseif ((int) $group > 0) { |
90 | 90 | try { |
91 | 91 | $this->parent = new org_openpsa_products_product_group_dba((int) $group); |
92 | - } catch (midcom_error $e) { |
|
92 | + } |
|
93 | + catch (midcom_error $e) { |
|
93 | 94 | $e->log(); |
94 | 95 | } |
95 | 96 | } |
@@ -100,7 +100,8 @@ |
||
100 | 100 | try { |
101 | 101 | $task = org_openpsa_projects_task_dba::get_cached($hour_report->task); |
102 | 102 | $options['success_url'] = $this->router->generate('list_hours_task', ['guid' => $task->guid]); |
103 | - } catch (midcom_error $e) { |
|
103 | + } |
|
104 | + catch (midcom_error $e) { |
|
104 | 105 | $e->log(); |
105 | 106 | } |
106 | 107 | return $this->get_workflow('delete', $options)->run($request); |
@@ -40,7 +40,8 @@ |
||
40 | 40 | { |
41 | 41 | try { |
42 | 42 | $this->db = connection::get_em()->getConnection()->getWrappedConnection(); |
43 | - } catch (\Exception $e) { |
|
43 | + } |
|
44 | + catch (\Exception $e) { |
|
44 | 45 | $this->db = $this->create_connection($input, $output); |
45 | 46 | } |
46 | 47 |
@@ -83,7 +83,8 @@ |
||
83 | 83 | $productgroup = new org_openpsa_products_product_group_dba($this->_product->productGroup); |
84 | 84 | $replacements['<PRODUCTGROUP_TITLE>'] = $productgroup->title; |
85 | 85 | $replacements['<PRODUCTGROUP_CODE>'] = $productgroup->code; |
86 | - } catch (midcom_error $e) { |
|
86 | + } |
|
87 | + catch (midcom_error $e) { |
|
87 | 88 | $replacements['<PRODUCTGROUP_TITLE>'] = ''; |
88 | 89 | $replacements['<PRODUCTGROUP_CODE>'] = ''; |
89 | 90 | } |
@@ -68,7 +68,8 @@ discard block |
||
68 | 68 | $field['type_config']['options'] = [0 => '', $customer->id => $customer->official]; |
69 | 69 | |
70 | 70 | $defaults['customer'] = $customer->id; |
71 | - } catch (midcom_error $e) { |
|
71 | + } |
|
72 | + catch (midcom_error $e) { |
|
72 | 73 | $customer = new org_openpsa_contacts_person_dba($guid); |
73 | 74 | $defaults['customerContact'] = $customer->id; |
74 | 75 | $field['type_config']['options'] = $this->list_groups(new org_openpsa_sales_salesproject_dba, [$customer->id => true]); |
@@ -142,7 +143,8 @@ discard block |
||
142 | 143 | try { |
143 | 144 | $company = org_openpsa_contacts_group_dba::get_cached($company_id); |
144 | 145 | $ret[$company->id] = $company->get_label(); |
145 | - } catch (midcom_error $e) { |
|
146 | + } |
|
147 | + catch (midcom_error $e) { |
|
146 | 148 | $e->log(); |
147 | 149 | } |
148 | 150 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | $password_length = mb_strlen($password); |
320 | 320 | |
321 | 321 | if ($password_length < $this->_config->get('min_password_length')) { |
322 | - if ($show_ui_message){ |
|
322 | + if ($show_ui_message) { |
|
323 | 323 | midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get('password too short'), 'error'); |
324 | 324 | } |
325 | 325 | return false; |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | } |
338 | 338 | |
339 | 339 | if ($score < $this->_config->get('min_password_score')) { |
340 | - if ($show_ui_message){ |
|
340 | + if ($show_ui_message) { |
|
341 | 341 | midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get('password weak'), 'error'); |
342 | 342 | } |
343 | 343 | return false; |