@@ -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'])) { |
@@ -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 | } |
@@ -409,7 +409,8 @@ |
||
| 409 | 409 | foreach ($this->_articles as $article_counter => $article) { |
| 410 | 410 | try { |
| 411 | 411 | $data['datamanager']->set_storage($article); |
| 412 | - } catch (midcom_error $e) { |
|
| 412 | + } |
|
| 413 | + catch (midcom_error $e) { |
|
| 413 | 414 | $e->log(); |
| 414 | 415 | continue; |
| 415 | 416 | } |
@@ -7,7 +7,8 @@ |
||
| 7 | 7 | try { |
| 8 | 8 | $person = new midcom_db_person($metadata->locker); |
| 9 | 9 | $name = $person->name; |
| 10 | -} catch (midcom_error $e) { |
|
| 10 | +} |
|
| 11 | +catch (midcom_error $e) { |
|
| 11 | 12 | $name = $l10n_midcom->get('unknown user'); |
| 12 | 13 | $e->log(); |
| 13 | 14 | } |