Virtuemart 2: Исправляем ошибки - Класс VmTable расширяющий функционал JTable

На сегодня беремся за API Virtuemart 2. Попробую разобраться с классом VmTable - расширяющий функционал класса JTable.

Конфигурация:
Joomla 2.5.11
Virtuemart 2.0.20b

Возникающие ошибки:
Strict Standards: Accessing static property TableCategories::$_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 59
Strict Standards: Accessing static property TableCategories::$_query_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 60
Strict Standards: Accessing static property TableProducts::$_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 59
Strict Standards: Accessing static property TableProducts::$_query_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 60
Strict Standards: Accessing static property TableVendors::$_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 59
Strict Standards: Accessing static property TableVendors::$_query_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 60
Strict Standards: Accessing static property TableRatings::$_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 59
Strict Standards: Accessing static property TableRatings::$_query_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 60
Strict Standards: Accessing static property TableManufacturers::$_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 59
Strict Standards: Accessing static property TableManufacturers::$_query_cache as non static in /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php on line 60

и т.д. с различными классами - TableCalcs, TableCustoms, TableProduct_customfields, TableOrderstates, TableOrders, TableVmusers, TableShoppergroups, TableShoppergroups, TableCoupons, TableVendors, TableVendor_medias, TableCurrencies.

Если я правильно понял логику виртмала, то модификатор переменной следует записывать private static. Открываем /home/www/site.ru/administrator/components/com_virtuemart/helpers/vmtable.php, находим две переменные

static $_cache = null;
static $_query_cache = null;

заменяем на

private static $_cache = null;
private static $_query_cache = null;

Пока только занимаюсь отладкой ошибок, поэтому работоспособность в полной мере проверить не могу, по крайней мере категории добавляются и сохраняются, но лучше проверить и на остальном функционале админки.

  • Спасибо, очень выручило!
  • job
    Пожалуйста!
  • thank you..:P