@@ -269,7 +269,8 @@ |
||
| 269 | 269 | $guid = $mc_parameter->get_subkey($parameter_key, 'parentguid'); |
| 270 | 270 | try { |
| 271 | 271 | $parent = midcom::get()->dbfactory->get_object_by_guid($guid); |
| 272 | - } catch (midcom_error $e) { |
|
| 272 | + } |
|
| 273 | + catch (midcom_error $e) { |
|
| 273 | 274 | $e->log(); |
| 274 | 275 | continue; |
| 275 | 276 | } |
@@ -59,7 +59,8 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | try { |
| 61 | 61 | $person = new org_openpsa_contacts_person_dba($member->person); |
| 62 | - } catch (midcom_error $e) { |
|
| 62 | + } |
|
| 63 | + catch (midcom_error $e) { |
|
| 63 | 64 | $e->log(); |
| 64 | 65 | return; |
| 65 | 66 | } |
@@ -82,7 +83,8 @@ discard block |
||
| 82 | 83 | $row['organization_member'] = $membership; |
| 83 | 84 | try { |
| 84 | 85 | $row['organization'] = org_openpsa_contacts_group_dba::get_cached($membership->gid); |
| 85 | - } catch (midcom_error $e) { |
|
| 86 | + } |
|
| 87 | + catch (midcom_error $e) { |
|
| 86 | 88 | debug_add("Error fetching org_openpsa_contacts_group_dba #{$membership->gid}, skipping", MIDCOM_LOG_WARN); |
| 87 | 89 | continue; |
| 88 | 90 | } |
@@ -142,7 +142,8 @@ |
||
| 142 | 142 | try { |
| 143 | 143 | $person = org_openpsa_contacts_person_dba::get_cached($link->person); |
| 144 | 144 | $segment = $person->get_parameter('org.openpsa.directmarketing.segments', $segmentation_param); |
| 145 | - } catch (midcom_error $e) { |
|
| 145 | + } |
|
| 146 | + catch (midcom_error $e) { |
|
| 146 | 147 | } |
| 147 | 148 | if (empty($segment)) { |
| 148 | 149 | $segment = $this->_l10n->get('no segment'); |
@@ -300,7 +300,8 @@ |
||
| 300 | 300 | $organization = $this->_import_subscribers_organization($subscriber); |
| 301 | 301 | $this->_import_subscribers_organization_member($subscriber, $person, $organization); |
| 302 | 302 | } |
| 303 | - } catch (midcom_error $e) { |
|
| 303 | + } |
|
| 304 | + catch (midcom_error $e) { |
|
| 304 | 305 | $e->log(); |
| 305 | 306 | // Clean up possibly created data |
| 306 | 307 | $this->_clean_new_objects(); |
@@ -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 | } |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | { |
| 26 | 26 | try { |
| 27 | 27 | $viewer->register_plugin_namespace('__feeds', ['rss' => ['class' => __CLASS__]]); |
| 28 | - } catch (midcom_error $e) { |
|
| 28 | + } |
|
| 29 | + catch (midcom_error $e) { |
|
| 29 | 30 | $e->log(); |
| 30 | 31 | } |
| 31 | 32 | } |
@@ -123,7 +123,8 @@ |
||
| 123 | 123 | $row = []; |
| 124 | 124 | try { |
| 125 | 125 | $row['person'] = org_openpsa_contacts_person_dba::get_cached($hour->person); |
| 126 | - } catch (midcom_error $e) { |
|
| 126 | + } |
|
| 127 | + catch (midcom_error $e) { |
|
| 127 | 128 | $e->log(); |
| 128 | 129 | continue; |
| 129 | 130 | } |
@@ -222,7 +222,8 @@ discard block |
||
| 222 | 222 | $this->_backend->send($person, $member, $token, $subject, $content, $from); |
| 223 | 223 | self::$_messages_sent++; |
| 224 | 224 | $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::SENT; |
| 225 | - } catch (midcom_error $e) { |
|
| 225 | + } |
|
| 226 | + catch (midcom_error $e) { |
|
| 226 | 227 | $status = org_openpsa_directmarketing_campaign_messagereceipt_dba::FAILURE; |
| 227 | 228 | if (!$this->test_mode) { |
| 228 | 229 | $params[] = [ |
@@ -279,7 +280,8 @@ discard block |
||
| 279 | 280 | { |
| 280 | 281 | try { |
| 281 | 282 | $person = org_openpsa_contacts_person_dba::get_cached($member->person); |
| 282 | - } catch (midcom_error $e) { |
|
| 283 | + } |
|
| 284 | + catch (midcom_error $e) { |
|
| 283 | 285 | debug_add("Person #{$member->person} deleted or missing, removing member (member #{$member->id})"); |
| 284 | 286 | $member->orgOpenpsaObtype = org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED; |
| 285 | 287 | $member->delete(); |
@@ -210,8 +210,7 @@ |
||
| 210 | 210 | { |
| 211 | 211 | $ret = []; |
| 212 | 212 | |
| 213 | - foreach ($this->storage as $field => $value) |
|
| 214 | - { |
|
| 213 | + foreach ($this->storage as $field => $value) { |
|
| 215 | 214 | $ret[$field] = $value->get_value(); |
| 216 | 215 | $config = $this->schema->get_field($field); |
| 217 | 216 | if (!empty($config['type_config']['allow_multiple'])) { |