@@ -52,9 +52,12 @@ discard block |
||
| 52 | 52 | $localeManager = \Aimeos\MShop::create( $this->context(), 'locale', 'Standard' ); |
| 53 | 53 | $siteManager = $localeManager->getSubManager( 'site' ); |
| 54 | 54 | |
| 55 | - try { |
|
| 55 | + try |
|
| 56 | + { |
|
| 56 | 57 | $siteItem = $siteManager->insert( $siteManager->create()->setLabel( $code )->setCode( $code ) ); |
| 57 | - } catch( \Aimeos\Base\DB\Exception $e ) { |
|
| 58 | + } |
|
| 59 | + catch( \Aimeos\Base\DB\Exception $e ) |
|
| 60 | + { |
|
| 58 | 61 | $siteItem = $siteManager->find( $code ); |
| 59 | 62 | } |
| 60 | 63 | |
@@ -68,7 +71,9 @@ discard block |
||
| 68 | 71 | |
| 69 | 72 | $localeManager->save( $localeItem, false ); |
| 70 | 73 | } |
| 71 | - catch( \Aimeos\Base\DB\Exception $e ) {} // already in the database |
|
| 74 | + catch( \Aimeos\Base\DB\Exception $e ) |
|
| 75 | + { |
|
| 76 | +} // already in the database |
|
| 72 | 77 | } |
| 73 | 78 | |
| 74 | 79 | |
@@ -167,9 +172,13 @@ discard block |
||
| 167 | 172 | $item = $localeManager->create()->fromArray( $dataset, true ) |
| 168 | 173 | ->setSiteId( $siteIds[$dataset['site']]['site'] ); |
| 169 | 174 | |
| 170 | - try { |
|
| 175 | + try |
|
| 176 | + { |
|
| 171 | 177 | $localeManager->save( $item ); |
| 172 | - } catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available |
|
| 178 | + } |
|
| 179 | + catch( \Aimeos\Base\DB\Exception $e ) |
|
| 180 | + { |
|
| 181 | +; } // if locale combination was already available |
|
| 173 | 182 | } |
| 174 | 183 | } |
| 175 | 184 | } |