Parse error "syntax error, unexpected T_DOUBLE_ARROW" in OpenCart
<p>I have some problem with a OpenCart code. I'm not a programmer but i have to fix this:</p>

<blockquote>
  <p>Parse error: syntax error, unexpected T_DOUBLE_ARROW in /var/www/subdomains/e/httpdocs/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 248</p>
</blockquote>

<p>Code looks like this, starting from 1 line:</p>

<pre><code>    &lt;?php   
class ControllerCommonHeader extends Controller {
    protected function index() {
        $this-&gt;data['title'] = $this-&gt;document-&gt;getTitle();

        if (isset($this-&gt;request-&gt;server['HTTPS']) &amp;&amp; (($this-&gt;request-&gt;server['HTTPS'] == 'on') || ($this-&gt;request-&gt;server['HTTPS'] == '1'))) {
            $server = $this-&gt;config-&gt;get('config_ssl');
        } else {
            $server = $this-&gt;config-&gt;get('config_url');
        }

        $this-&gt;data['base'] = $server;
        $this-&gt;data['description'] = $this-&gt;document-&gt;getDescription();
        $this-&gt;data['keywords'] = $this-&gt;document-&gt;getKeywords();
        $this-&gt;data['links'] = $this-&gt;document-&gt;getLinks();  
        $this-&gt;data['styles'] = $this-&gt;document-&gt;getStyles();
        $this-&gt;data['scripts'] = $this-&gt;document-&gt;getScripts();
        $this-&gt;data['lang'] = $this-&gt;language-&gt;get('code');
        $this-&gt;data['direction'] = $this-&gt;language-&gt;get('direction');
        $this-&gt;data['google_analytics'] = html_entity_decode($this-&gt;config-&gt;get('config_google_analytics'), ENT_QUOTES, 'UTF-8');
        $this-&gt;data['name'] = $this-&gt;config-&gt;get('config_name');

        if ($this-&gt;config-&gt;get('config_icon') &amp;&amp; file_exists(DIR_IMAGE . $this-&gt;config-&gt;get('config_icon'))) {
            $this-&gt;data['icon'] = $server . 'image/' . $this-&gt;config-&gt;get('config_icon');
        } else {
            $this-&gt;data['icon'] = '';
        }

        if ($this-&gt;config-&gt;get('config_logo') &amp;&amp; file_exists(DIR_IMAGE . $this-&gt;config-&gt;get('config_logo'))) {
            $this-&gt;data['logo'] = $server . 'image/' . $this-&gt;config-&gt;get('config_logo');
        } else {
            $this-&gt;data['logo'] = '';
        }       

        $this-&gt;language-&gt;load('common/header');

        $this-&gt;data['text_home'] = $this-&gt;language-&gt;get('text_home');
        $this-&gt;data['text_wishlist'] = sprintf($this-&gt;language-&gt;get('text_wishlist'), (isset($this-&gt;session-&gt;data['wishlist']) ? count($this-&gt;session-&gt;data['wishlist']) : 0));
        $this-&gt;data['text_shopping_cart'] = $this-&gt;language-&gt;get('text_shopping_cart');
        $this-&gt;data['text_search'] = $this-&gt;language-&gt;get('text_search');
        $this-&gt;data['text_welcome'] = sprintf($this-&gt;language-&gt;get('text_welcome'), $this-&gt;url-&gt;link('account/login', '', 'SSL'), $this-&gt;url-&gt;link('account/register', '', 'SSL'));
        $this-&gt;data['text_logged'] = sprintf($this-&gt;language-&gt;get('text_logged'), $this-&gt;url-&gt;link('account/account', '', 'SSL'), $this-&gt;customer-&gt;getFirstName(), $this-&gt;url-&gt;link('account/logout', '', 'SSL'));
        $this-&gt;data['text_account'] = $this-&gt;language-&gt;get('text_account');
        $this-&gt;data['text_checkout'] = $this-&gt;language-&gt;get('text_checkout');

        $this-&gt;data['home'] = $this-&gt;url-&gt;link('common/home');
        $this-&gt;data['wishlist'] = $this-&gt;url-&gt;link('account/wishlist', '', 'SSL');
        $this-&gt;data['logged'] = $this-&gt;customer-&gt;isLogged();
        $this-&gt;data['account'] = $this-&gt;url-&gt;link('account/account', '', 'SSL');
        $this-&gt;data['shopping_cart'] = $this-&gt;url-&gt;link('checkout/cart');
        $this-&gt;data['checkout'] = $this-&gt;url-&gt;link('checkout/checkout', '', 'SSL');

        // Daniel's robot detector
        $status = true;

        if (isset($this-&gt;request-&gt;server['HTTP_USER_AGENT'])) {
            $robots = explode("\n", trim($this-&gt;config-&gt;get('config_robots')));

            foreach ($robots as $robot) {
                if ($robot &amp;&amp; strpos($this-&gt;request-&gt;server['HTTP_USER_AGENT'], trim($robot)) !== false) {
                    $status = false;

                    break;
                }
            }
        }

        // A dirty hack to try to set a cookie for the multi-store feature
        $this-&gt;load-&gt;model('setting/store');

        $this-&gt;data['stores'] = array();

        if ($this-&gt;config-&gt;get('config_shared') &amp;&amp; $status) {
            $this-&gt;data['stores'][] = $server . 'catalog/view/javascript/crossdomain.php?session_id=' . $this-&gt;session-&gt;getId();

            $stores = $this-&gt;model_setting_store-&gt;getStores();

            foreach ($stores as $store) {
                $this-&gt;data['stores'][] = $store['url'] . 'catalog/view/javascript/crossdomain.php?session_id=' . $this-&gt;session-&gt;getId();
            }
        }

        // Search       
        if (isset($this-&gt;request-&gt;get['search'])) {
            $this-&gt;data['search'] = $this-&gt;request-&gt;get['search'];
        } else {
            $this-&gt;data['search'] = '';
        }

        // Menu

        if (isset($this-&gt;request-&gt;get['path'])) {
            $parts = explode('_', (string)$this-&gt;request-&gt;get['path']);
        } else {
            $parts = array();
        }

        if (isset($parts[0])) {
            $this-&gt;data['category_id'] = $parts[0];
        } else {
            $this-&gt;data['category_id'] = 0;
        }

    if (isset($parts[1])) {
      $this-&gt;data['child_id'] = $parts[1];
    } else {
      $this-&gt;data['child_id'] = 0;
    }

    if (isset($parts[2])) {
      $this-&gt;data['child2_id'] = $parts[2];
    } else {
      $this-&gt;data['child2_id'] = 0;
    }

    if (isset($parts[3])) {
      $this-&gt;data['child3_id'] = $parts[3];
    } else {
      $this-&gt;data['child3_id'] = 0;
    }

        $this-&gt;load-&gt;model('catalog/category');

        $this-&gt;load-&gt;model('catalog/product');

        $this-&gt;data['categories'] = array();


      $categories = $this-&gt;model_catalog_category-&gt;getCategories(0);

      foreach ($categories as $category) {

          if ($category['top']) {              

              $total = $this-&gt;model_catalog_product-&gt;getTotalProducts(array('filter_category_id' =&gt; $category['category_id']));

              $children_data = array();

              $children = $this-&gt;model_catalog_category-&gt;getCategories($category['category_id']);

            foreach ($children as $child) {
                $data = array(
                    'filter_category_id'  =&gt; $child['category_id'],
                    'filter_sub_category' =&gt; true
                );

                $product_total = $this-&gt;model_catalog_product-&gt;getTotalProducts($data);

                $total += $product_total;

        $children2_data = array();

        $children2 = $this-&gt;model_catalog_category-&gt;getCategories($child['category_id']);

      foreach ($children2 as $child2) {

        $data2 = array(
          'filter_category_id'  =&gt; $child2['category_id'],
          'filter_sub_category' =&gt; true
        );

        $product_total2 = $this-&gt;model_catalog_product-&gt;getTotalProducts($data2);

        $total += $product_total2;

        $children3_data = array();

        $children3 = $this-&gt;model_catalog_category-&gt;getCategories($child2['category_id']);

      foreach ($children3 as $child3) {

        $data3 = array(
          'filter_category_id'  =&gt; $child3['category_id'],
          'filter_sub_category' =&gt; true
        );

        $product_total3 = $this-&gt;model_catalog_product-&gt;getTotalProducts($data3);

        $total += $product_total3;

        $children3_data[] = array(
          'category_id' =&gt; $child3['category_id'],
          'name'        =&gt; $child3['name'] . ($this-&gt;config-&gt;get('config_product_count') ? ' (' . $product_total3 . ')' : ''),
          'href'        =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child2['category_id'] . '_' . $child3['category_id'])
        );

    }

        $children2_data[] = array(
          'category_id' =&gt; $child2['category_id'],
          'child3_id'   =&gt; $children3_data,                    
          'name'        =&gt; $child2['name'] . ($this-&gt;config-&gt;get('config_product_count') ? ' (' . $product_total2 . ')' : ''),
          'href'        =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'] . '_' . $child2['category_id'])
        );

    }

                $children_data[] = array(
                    'category_id' =&gt; $child['category_id'],
                    'child2_id'   =&gt; $children2_data,
                    'name'        =&gt; $child['name'] . ($this-&gt;config-&gt;get('config_product_count') ? ' (' . $product_total . ')' : ''),
                    'href'        =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id']) 
                );      

        }

            $this-&gt;data['categories'][] = array(
                'category_id' =&gt; $category['category_id'],
                'name'        =&gt; $category['name'],
//              'name'        =&gt; $category['name'] . ($this-&gt;config-&gt;get('config_product_count') ? ' (' . $total . ')' : ''),
                'children'    =&gt; $children_data,
                'href'        =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'])
            );
   }
}       
































'children' =&gt; $children_data1, //
                        'name'  =&gt; $child['name'] . ($this-&gt;config-&gt;get('config_product_count') ? ' (' . $product_total . ')' : ''),
                        'href'  =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])
                    );                      
                }

                // Level 1
                $this-&gt;data['categories'][] = array(
                    'name'     =&gt; $category['name'],
                    'children' =&gt; $children_data,
                    'column'   =&gt; $category['column'] ? $category['column'] : 1,
                    'href'     =&gt; $this-&gt;url-&gt;link('product/category', 'path=' . $category['category_id'])
                );
            }
        }

        $this-&gt;children = array(
            'module/language',
            'module/currency',
            'module/cart'
        );

        if (file_exists(DIR_TEMPLATE . $this-&gt;config-&gt;get('config_template') . '/template/common/header.tpl')) {
            $this-&gt;template = $this-&gt;config-&gt;get('config_template') . '/template/common/header.tpl';
        } else {
            $this-&gt;template = 'default/template/common/header.tpl';
        }

        $this-&gt;render();
    }   
}
?&gt;
</code></pre>
