@@ -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 | } |
@@ -62,7 +62,8 @@ |
||
| 62 | 62 | try { |
| 63 | 63 | $this->__object = call_user_func([$this->__midcom_class_name__, 'get_cached'], $this->__identifier); |
| 64 | 64 | return true; |
| 65 | - } catch (midcom_error $e) { |
|
| 65 | + } |
|
| 66 | + catch (midcom_error $e) { |
|
| 66 | 67 | $e->log(); |
| 67 | 68 | } |
| 68 | 69 | return false; |
@@ -553,7 +553,8 @@ |
||
| 553 | 553 | $tree = []; |
| 554 | 554 | try { |
| 555 | 555 | $children = self::get_child_objects($parent); |
| 556 | - } catch (midcom_error $e) { |
|
| 556 | + } |
|
| 557 | + catch (midcom_error $e) { |
|
| 557 | 558 | return $tree; |
| 558 | 559 | } |
| 559 | 560 | |
@@ -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'])) { |
@@ -83,7 +83,8 @@ discard block |
||
| 83 | 83 | try { |
| 84 | 84 | $dms['group']->set_storage($group); |
| 85 | 85 | org_openpsa_products_viewer::index($dms['group'], $indexer, $topic, $config); |
| 86 | - } catch (midcom_error $e) { |
|
| 86 | + } |
|
| 87 | + catch (midcom_error $e) { |
|
| 87 | 88 | $e->log(MIDCOM_LOG_WARN); |
| 88 | 89 | } |
| 89 | 90 | } |
@@ -96,7 +97,8 @@ discard block |
||
| 96 | 97 | try { |
| 97 | 98 | $dms['product']->set_storage($product); |
| 98 | 99 | org_openpsa_products_viewer::index($dms['product'], $indexer, $topic, $config); |
| 99 | - } catch (midcom_error $e) { |
|
| 100 | + } |
|
| 101 | + catch (midcom_error $e) { |
|
| 100 | 102 | $e->log(MIDCOM_LOG_WARN); |
| 101 | 103 | } |
| 102 | 104 | } |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | $this->config = $config; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | - protected function cast($value) { |
|
| 33 | + protected function cast($value) |
|
| 34 | + { |
|
| 34 | 35 | if ($this->config['type'] == 'number' && !is_numeric($value)) { |
| 35 | 36 | $value = (float) $value; |
| 36 | 37 | } |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | foreach ($result as $wikipage) { |
| 31 | 31 | try { |
| 32 | 32 | $datamanager->set_storage($wikipage); |
| 33 | - } catch (midcom_error $e) { |
|
| 33 | + } |
|
| 34 | + catch (midcom_error $e) { |
|
| 34 | 35 | $e->log(MIDCOM_LOG_WARN); |
| 35 | 36 | continue; |
| 36 | 37 | } |