@@ -126,7 +126,8 @@ |
||
| 126 | 126 | $salesproject = org_openpsa_sales_salesproject_dba::get_cached($this->_deliverable->salesproject); |
| 127 | 127 | try { |
| 128 | 128 | $owner = midcom_db_person::get_cached($salesproject->owner); |
| 129 | - } catch (midcom_error $e) { |
|
| 129 | + } |
|
| 130 | + catch (midcom_error $e) { |
|
| 130 | 131 | $e->log(); |
| 131 | 132 | return; |
| 132 | 133 | } |
@@ -159,7 +159,8 @@ |
||
| 159 | 159 | |
| 160 | 160 | try { |
| 161 | 161 | $object = new $classname($guid); |
| 162 | - } catch (midcom_error $e) { |
|
| 162 | + } |
|
| 163 | + catch (midcom_error $e) { |
|
| 163 | 164 | $handler->print_error($type . " {$guid} not found, error " . $e->getMessage()); |
| 164 | 165 | return false; |
| 165 | 166 | } |
@@ -71,7 +71,8 @@ |
||
| 71 | 71 | $owner = org_openpsa_contacts_person_dba::get_cached($salesproject->owner); |
| 72 | 72 | $row['index_owner'] = $owner->name; |
| 73 | 73 | $row['owner'] = org_openpsa_widgets_contact::get($owner->guid)->show_inline(); |
| 74 | - } catch (midcom_error $e) { |
|
| 74 | + } |
|
| 75 | + catch (midcom_error $e) { |
|
| 75 | 76 | $e->log(); |
| 76 | 77 | } |
| 77 | 78 | $row['amount'] = $object->pricePerUnit * $object->units; |
@@ -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(); |
@@ -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 | } |
@@ -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 | } |