Skip to content

Commit

Permalink
#3436 - Defined Array Key
Browse files Browse the repository at this point in the history
  • Loading branch information
abrookbanks committed Nov 22, 2023
1 parent 214d15f commit 1e1b634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/catalogue.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ public function searchCatalogue($search_data = null, $page = 1, $per_page = 10,
$this->_category_count = (int)count($count);
$this->_category_products = $search;
$this->_sort_by_relevance = true;
if ($page == 1 && count($this->_category_products)==1 && ctype_digit($this->_category_products[0]['product_id']) && $_SERVER['HTTP_X_REQUESTED_WITH']!=='XMLHttpRequest') {
if ($page == 1 && count($this->_category_products)==1 && ctype_digit($this->_category_products[0]['product_id']) && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH']!=='XMLHttpRequest')) {
$GLOBALS['gui']->setNotify(sprintf($GLOBALS['language']->catalogue['notify_product_search_one'], $_REQUEST['search']['keywords']));
httpredir('?_a=product&product_id='.$this->_category_products[0]['product_id']);
}
Expand Down Expand Up @@ -2094,7 +2094,7 @@ public function searchCatalogue($search_data = null, $page = 1, $per_page = 10,
$count = $GLOBALS['db']->query($q2);
$this->_category_count = (int)count($count);
$this->_category_products = $search;
if ($page == 1 && count($this->_category_products)==1 && ctype_digit($this->_category_products[0]['product_id']) && $_SERVER['HTTP_X_REQUESTED_WITH']!=='XMLHttpRequest') {
if ($page == 1 && count($this->_category_products)==1 && ctype_digit($this->_category_products[0]['product_id']) && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || $_SERVER['HTTP_X_REQUESTED_WITH']!=='XMLHttpRequest')) {
$GLOBALS['gui']->setNotify(sprintf($GLOBALS['language']->catalogue['notify_product_search_one'], $_REQUEST['search']['keywords']));
httpredir('?_a=product&product_id='.$this->_category_products[0]['product_id']);
}
Expand Down

0 comments on commit 1e1b634

Please sign in to comment.