@@ -192,7 +192,8 @@ |
||
| 192 | 192 | foreach ($this->$identifier as $member) { |
| 193 | 193 | try { |
| 194 | 194 | $this->_request_data['group'] = org_openpsa_contacts_group_dba::get_cached($member->gid); |
| 195 | - } catch (midcom_error $e) { |
|
| 195 | + } |
|
| 196 | + catch (midcom_error $e) { |
|
| 196 | 197 | $e->log(); |
| 197 | 198 | continue; |
| 198 | 199 | } |
@@ -291,7 +291,8 @@ discard block |
||
| 291 | 291 | $url = $this->router->generate('project', ['guid' => $project->guid]); |
| 292 | 292 | $ret['project'] = '<a href="' . $url . '">' . $project->title . '</a>'; |
| 293 | 293 | $ret['index_project'] = $project->title; |
| 294 | - } catch (midcom_error $e) { |
|
| 294 | + } |
|
| 295 | + catch (midcom_error $e) { |
|
| 295 | 296 | $e->log(); |
| 296 | 297 | } |
| 297 | 298 | |
@@ -303,7 +304,8 @@ discard block |
||
| 303 | 304 | $customer_url = "{$contacts_url}group/{$customer->guid}/"; |
| 304 | 305 | $ret['customer'] = "<a href='{$customer_url}' title='{$customer->official}'>{$customer->get_label()}</a>"; |
| 305 | 306 | $ret['index_customer'] = $customer->name; |
| 306 | - } catch (midcom_error $e) { |
|
| 307 | + } |
|
| 308 | + catch (midcom_error $e) { |
|
| 307 | 309 | $ret['customer'] = ''; |
| 308 | 310 | $ret['index_customer'] = ''; |
| 309 | 311 | } |
@@ -51,7 +51,8 @@ |
||
| 51 | 51 | if ($root_topic->style) { |
| 52 | 52 | $scope = midcom_db_style::id_from_path($root_topic->style); |
| 53 | 53 | } |
| 54 | - } catch (midcom_error_forbidden $e) { |
|
| 54 | + } |
|
| 55 | + catch (midcom_error_forbidden $e) { |
|
| 55 | 56 | $e->log(); |
| 56 | 57 | } |
| 57 | 58 | } |
@@ -136,7 +136,8 @@ |
||
| 136 | 136 | |
| 137 | 137 | try { |
| 138 | 138 | eval('?>' . $preparsed); |
| 139 | - } catch (ParseError $e) { |
|
| 139 | + } |
|
| 140 | + catch (ParseError $e) { |
|
| 140 | 141 | throw new midcom_error("Failed to parse style element '{$path}': " . $e->getMessage() . ' in line ' . $e->getLine()); |
| 141 | 142 | } |
| 142 | 143 | } |
@@ -47,7 +47,8 @@ |
||
| 47 | 47 | $target = new midcom_db_topic($request->request->getInt('move_to')); |
| 48 | 48 | $this->_move_object($target); |
| 49 | 49 | midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('moved %s to %s'), $this->_topic->get_label(), $target->get_label())); |
| 50 | - } catch (midcom_error $e) { |
|
| 50 | + } |
|
| 51 | + catch (midcom_error $e) { |
|
| 51 | 52 | midcom::get()->uimessages->add($this->_l10n->get($this->_component), $e->getMessage(), 'error'); |
| 52 | 53 | } |
| 53 | 54 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $result = $this->is_username_available($fields); |
| 48 | 48 | |
| 49 | 49 | $accounthelper = new org_openpsa_user_accounthelper(); |
| 50 | - if ($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])){ |
|
| 50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])) { |
|
| 51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | $user = new midcom_db_person($fields["person"]); |
| 150 | 150 | |
| 151 | 151 | $accounthelper = new org_openpsa_user_accounthelper($user); |
| 152 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
| 152 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
| 153 | 153 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
| 154 | 154 | } |
| 155 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
| 155 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
| 156 | 156 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
| 157 | 157 | } |
| 158 | 158 | return $result ?: true; |
@@ -142,7 +142,8 @@ |
||
| 142 | 142 | //create reflector with linked object to get the right label |
| 143 | 143 | try { |
| 144 | 144 | $linked_object = midcom::get()->dbfactory->get_object_by_guid($entry->linkGuid); |
| 145 | - } catch (midcom_error $e) { |
|
| 145 | + } |
|
| 146 | + catch (midcom_error $e) { |
|
| 146 | 147 | unset($data['entries'][$i]); |
| 147 | 148 | $e->log(); |
| 148 | 149 | continue; |
@@ -161,7 +161,8 @@ discard block |
||
| 161 | 161 | $response = $this->handle($this->request); |
| 162 | 162 | $response->send(); |
| 163 | 163 | $this->terminate($this->request, $response); |
| 164 | - } catch (Error $e) { |
|
| 164 | + } |
|
| 165 | + catch (Error $e) { |
|
| 165 | 166 | $this->getHttpKernel()->terminateWithException($e); |
| 166 | 167 | } |
| 167 | 168 | } |
@@ -218,11 +219,13 @@ discard block |
||
| 218 | 219 | $this->skip_page_style = true; |
| 219 | 220 | try { |
| 220 | 221 | $response = $this->handle($request, HttpKernelInterface::SUB_REQUEST, false); |
| 221 | - } catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
| 222 | + } |
|
| 223 | + catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
| 222 | 224 | $e->log(); |
| 223 | 225 | midcom_core_context::leave(); |
| 224 | 226 | return; |
| 225 | - } finally { |
|
| 227 | + } |
|
| 228 | + finally { |
|
| 226 | 229 | $this->skip_page_style = $backup; |
| 227 | 230 | } |
| 228 | 231 | |
@@ -113,7 +113,8 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | try { |
| 115 | 115 | $person = midcom_db_person::get_cached($src); |
| 116 | - } catch (midcom_error $e) { |
|
| 116 | + } |
|
| 117 | + catch (midcom_error $e) { |
|
| 117 | 118 | return $cache[$src] = new self(new midcom_db_person); |
| 118 | 119 | } |
| 119 | 120 | |
@@ -313,7 +314,8 @@ discard block |
||
| 313 | 314 | foreach ($mc->get_rows(['gid', 'extra']) as $data) { |
| 314 | 315 | try { |
| 315 | 316 | $group = org_openpsa_contacts_group_dba::get_cached($data['gid']); |
| 316 | - } catch (midcom_error $e) { |
|
| 317 | + } |
|
| 318 | + catch (midcom_error $e) { |
|
| 317 | 319 | $e->log(); |
| 318 | 320 | continue; |
| 319 | 321 | } |