@@ -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 | } |
@@ -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 | } |
@@ -141,7 +141,8 @@ discard block |
||
| 141 | 141 | foreach ($this->_articles as $article_counter => $article) { |
| 142 | 142 | try { |
| 143 | 143 | $data['datamanager']->set_storage($article); |
| 144 | - } catch (midcom_error $e) { |
|
| 144 | + } |
|
| 145 | + catch (midcom_error $e) { |
|
| 145 | 146 | $e->log(); |
| 146 | 147 | continue; |
| 147 | 148 | } |
@@ -178,7 +179,8 @@ discard block |
||
| 178 | 179 | if ($this->_config->get('comments_topic')) { |
| 179 | 180 | try { |
| 180 | 181 | $comments_topic = new midcom_db_topic($this->_config->get('comments_topic')); |
| 181 | - } catch (midcom_error $e) { |
|
| 182 | + } |
|
| 183 | + catch (midcom_error $e) { |
|
| 182 | 184 | return false; |
| 183 | 185 | } |
| 184 | 186 | |
@@ -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 | } |
@@ -12,7 +12,8 @@ |
||
| 12 | 12 | foreach ($data['wikilinks'] as $link) { |
| 13 | 13 | try { |
| 14 | 14 | $page = new net_nemein_wiki_wikipage($link->frompage); |
| 15 | - } catch (midcom_error $e) { |
|
| 15 | + } |
|
| 16 | + catch (midcom_error $e) { |
|
| 16 | 17 | $e->log(); |
| 17 | 18 | continue; |
| 18 | 19 | } |
@@ -35,7 +35,8 @@ |
||
| 35 | 35 | try { |
| 36 | 36 | $article = new midcom_db_article($related); |
| 37 | 37 | echo "<li><a href=\"" . midcom::get()->permalinks->create_permalink($article->guid) . "\">{$article->title}</a></li>\n"; |
| 38 | - } catch (midcom_error $e) { |
|
| 38 | + } |
|
| 39 | + catch (midcom_error $e) { |
|
| 39 | 40 | $e->log(); |
| 40 | 41 | } |
| 41 | 42 | } |