Parse error: syntax error, unexpected '[' in /admin/controller/module/import_xls.php on line 8
поставил себе модуль для ocStore версия 1.5.5.1.2 Версия php PHP 5.3
Теперь при заходе в модуль выдает такую ошибку
Parse error: syntax error, unexpected '[' in /admin/controller/module/import_xls.php on line 8
Сам код
{
private $error = array();
private $data_to_view = array();
private static $OPENCART_TABLES_WHITELIST = [
// comunes/solo para v1.x
'address',
'affiliate',
'affiliate_transaction',
'attribute',
'attribute_description',
'attribute_group',
'attribute_group_description',
'banner',
'banner_image',
'banner_image_description',
'category',
'category_description',
'category_filter',
'category_path',
'category_to_layout',
'category_to_store',
'country',
'coupon',
'coupon_category',
'coupon_history',
'coupon_product',
'currency',
'custom_field',
'custom_field_description',
'custom_field_to_customer_group',
'custom_field_value',
'custom_field_value_description',
'customer',
'customer_ban_ip',
'customer_field',
'customer_group',
'customer_group_description',
'customer_history',
'customer_ip',
'customer_online',
'customer_reward',
'customer_transaction',
'download',
'download_description',
'extension',
'filter',
'filter_description',
'filter_group',
'filter_group_description',
'geo_zone',
'information',
'information_description',
'information_to_layout',
'information_to_store',
'language',
'layout',
'layout_route',
'length_class',
'length_class_description',
'manufacturer',
'manufacturer_to_store',
'option',
'option_description',
'option_value',
'option_value_description',
'order',
'order_download',
'order_field',
'order_fraud',
'order_history',
'order_option',
'order_product',
'order_recurring',
'order_recurring_transaction',
'order_status',
'order_total',
'order_voucher',
'product',
'product_attribute',
'product_description',
'product_discount',
'product_filter',
'product_image',
'product_option',
'product_option_value',
'product_profile',
'product_recurring',
'product_related',
'product_reward',
'product_special',
'product_to_category',
'product_to_download',
'product_to_layout',
'product_to_store',
'profile',
'profile_description',
'return',
'return_action',
'return_history',
'return_reason',
'return_status',
'review',
'setting',
'stock_status',
'store',
'tax_class',
'tax_rate',
'tax_rate_to_customer_group',
'tax_rule',
'url_alias',
'user',
'user_group',
'voucher',
'voucher_history',
'voucher_theme',
'voucher_theme_description',
'weight_class',
'weight_class_description',
'zone',
'zone_to_geo_zone',
// v2.x/v3.x
'affiliate_activity',
'affiliate_login',
'api',
'api_ip',
'api_session',
'cart',
'city',
'custom_field_customer_group',
'customer_activity',
'customer_login',
'customer_search',
'customer_wishlist',
'event',
'layout_module',
'location',
'marketing',
'menu',
'menu_description',
'menu_module',
'modification',
'module',
'order_custom_field',
'recurring',
'recurring_description',
'theme',
'translation',
'upload',
// solo v3.x
'customer_affiliate',
'customer_approval',
'extension_install',
'extension_path',
'googleshopping_category',
'googleshopping_product',
'googleshopping_product_status',
'googleshopping_product_target',
'googleshopping_target',
'order_shipment',
'seo_url',
'session',
'shipping_courier',
'statistics'
];
public function __construct($registry)
{
//Call to parent __construct
parent::__construct($registry);
if(defined('IE_PRO_CRON')) {
ob_start();
$this->is_cron_task = true;
$this->request->get['route'] = '';
$this->request->get['ajax_function'] = 'launch_profile';
$this->request->post['profile_id'] = PROFILE_ID;
}
//Check server requirements
$this->_server_configuration();
$this->_get_module_data();
$this->_get_form_basic_data();
if ($this->request->get['route'] == $this->real_extension_type.'/'.$this->extension_name)
$this->form_array = $this->_construct_view_form();
$this->setupClassLoader();
}
Ответы (1 шт):
Автор решения: Yaroslav Molchan
→ Ссылка
Короткий синтаксис для массивов появился только в версии 5.4, обновите версию до 5.4 или если позволяет версия ocStore работать на 5.3, то просто замените синтакс на старый:
private static $OPENCART_TABLES_WHITELIST = array(
// comunes/solo para v1.x
'address',
'affiliate',
'affiliate_transaction',
...
);