@@ -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 | } |
@@ -29,7 +29,8 @@ |
||
| 29 | 29 | $member->require_do('midgard:update'); |
| 30 | 30 | $member->extra = $request->request->get('title'); |
| 31 | 31 | $response->status = $member->update(); |
| 32 | - } catch (midcom_error $e) { |
|
| 32 | + } |
|
| 33 | + catch (midcom_error $e) { |
|
| 33 | 34 | $e->log(); |
| 34 | 35 | } |
| 35 | 36 | $response->message = midcom_connection::get_error_string(); |
@@ -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); |
@@ -196,7 +196,8 @@ discard block |
||
| 196 | 196 | foreach ($guids as $guid) { |
| 197 | 197 | try { |
| 198 | 198 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 199 | - } catch (midcom_error $e) { |
|
| 199 | + } |
|
| 200 | + catch (midcom_error $e) { |
|
| 200 | 201 | continue; |
| 201 | 202 | } |
| 202 | 203 | |
@@ -211,7 +212,8 @@ discard block |
||
| 211 | 212 | foreach ($guids as $guid) { |
| 212 | 213 | try { |
| 213 | 214 | $object = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 214 | - } catch (midcom_error $e) { |
|
| 215 | + } |
|
| 216 | + catch (midcom_error $e) { |
|
| 215 | 217 | continue; |
| 216 | 218 | } |
| 217 | 219 | |
@@ -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 | } |
@@ -238,7 +238,8 @@ discard block |
||
| 238 | 238 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($agreement->salesproject); |
| 239 | 239 | $this->customer = $salesproject->customer; |
| 240 | 240 | } |
| 241 | - } catch (midcom_error $e) { |
|
| 241 | + } |
|
| 242 | + catch (midcom_error $e) { |
|
| 242 | 243 | } |
| 243 | 244 | } else { |
| 244 | 245 | // No agreement, we can't be invoiceable |
@@ -283,7 +284,8 @@ discard block |
||
| 283 | 284 | try { |
| 284 | 285 | $agreement = new org_openpsa_sales_salesproject_deliverable_dba($this->get_agreement()); |
| 285 | 286 | $agreement->update_units($this->id, $hours); |
| 286 | - } catch (midcom_error $e) { |
|
| 287 | + } |
|
| 288 | + catch (midcom_error $e) { |
|
| 287 | 289 | } |
| 288 | 290 | |
| 289 | 291 | if ($update) { |
@@ -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; |