@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $first = ( $offset > 0 ? 0 : null ); |
| 24 | 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
| 25 | 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); |
| 26 | -$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null ); |
|
| 26 | +$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); |
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); |
@@ -145,8 +145,7 @@ |
||
| 145 | 145 | $data[] = $entryFcn( $attrItem ); |
| 146 | 146 | $included = array_merge( $included, $refFcn( $attrItem ) ); |
| 147 | 147 | } |
| 148 | - } |
|
| 149 | - else |
|
| 148 | + } else |
|
| 150 | 149 | { |
| 151 | 150 | $data = $entryFcn( $items ); |
| 152 | 151 | $included = $refFcn( $items ); |
@@ -44,13 +44,11 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | $status = 200; |
| 47 | - } |
|
| 48 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 47 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | 48 | { |
| 50 | 49 | $status = 404; |
| 51 | 50 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 52 | - } |
|
| 53 | - catch( \Exception $e ) |
|
| 51 | + } catch( \Exception $e ) |
|
| 54 | 52 | { |
| 55 | 53 | $status = 500; |
| 56 | 54 | $view->errors = $this->getErrorDetails( $e ); |