До Даниэля я вряд ли достучусь, а тут стоило попробовать.
Похоже, я при вставке кода перепутал и ветку и метод, извиняюсь. Не "getQueryByKeyword", а "getKeywordByQuery".
Смотрим сюда: https://github.com/ocStore/ocStore/blob/ocstore-3-1-0-0/upload/catalog/controller/startup/seo_url.php
public function rewrite($link) {
$url_info = parse_url(str_replace('&', '&', $link));
if($this->config->get('config_seo_pro')){
$url = null;
} else {
$url = '';
}
$url_info = parse_url(str_replace('&', '&', $link));
parse_str($url_info['query'], $data);
//seo_pro baseRewrite
if($this->config->get('config_seo_pro')){
list($url, $data, $postfix) = $this->seo_pro->baseRewrite($data, (int)$this->config->get('config_language_id'));
}
...
...
И следуем по пути в https://github.com/ocStore/ocStore/blob/ocstore-3-1-0-0/upload/system/library/seopro.php
public function baseRewrite($data, $language_id) {
$url = null;
$postfix = null;
$language_id = (int)$this->config->get('config_language_id');
switch ($data['route']) {
case 'product/product':
$postfix = true;
if (isset($data['product_id'])) {
$route = 'product/product';
$path = '';
$product_id = $data['product_id'];
if (isset($data['path'])) {
$path = $this->getPathByProduct($product_id);
}
unset($data);
$data['route'] = $route;
if ($path && $this->config->get('config_seo_url_include_path')) {
$data['path'] = $path;
}
$data['product_id'] = $product_id;
}
break;
case 'product/category':
if (isset($data['path'])) {
$category = explode('_', $data['path']);
$category = end($category);
$data['path'] = $this->getPathByCategory($category);
//if (!$data['path']) return $url;
}
break;
case 'product/product/review':
case 'information/information/info':
case 'product/manufacturer/info':
break;
default:
break;
}
$queries = array();
foreach ($data as $key => $value) {
$query_ = $this->getKeywordByQuery($value);
//single_url
if($query_ !== null) {
unset($data[$key]);
//common/home
if($query_ == '') return [$query_, $data , $postfix];
//common/home
return ['/' . $query_, $data , $postfix];
}
//single_url
...
...
Обращаем внимание на это место:
foreach ($data as $key => $value) {
$query_ = $this->getKeywordByQuery($value);
Ну и сам метод "getKeywordByQuery":
public function getKeywordByQuery($query, $language_id = '') {
$store_id = (int)$this->config->get('config_store_id');
if(!$language_id) {
$language_id = $this->config->get('config_language_id');
}
if($this->config->get('config_seo_url_cache')){
if(isset($this->keywords[$query][$store_id][$language_id]))
return($this->keywords[$query][$store_id][$language_id]);
}
$sql = "SELECT keyword FROM " . DB_PREFIX . "seo_url WHERE query = '" . $this->db->escape($query) . "' AND store_id = '" . $store_id . "' AND language_id = '" . (int)$language_id . "' LIMIT 1";
$query = $this->db->query($sql);
if ($query->num_rows) {
return $query->row['keyword'];
}
return;
}
Ну и как же туда может попасть массив? Да очень просто, в каком-нибудь контроллере пишем:
$this->url->link('product/category', 'language=' . $this->config->get('config_language') . '&path=' . $this->request->get['path'] . '&' . http_build_query(array('array' => ['foo' => 'bar'])));
И натыкаемся на тот самый warning