Procházet zdrojové kódy

Fix to make sure search goes to page 1 if no page is defined

Michael Francis před 14 roky
rodič
revize
a5c4406821
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      controllers/SearchController.php

+ 1 - 1
controllers/SearchController.php

@@ -22,7 +22,7 @@ class SearchController extends \lithium\action\Controller {
 	{
 		
 		$searchParam = '/' . $this->request->query['search'] . '/i';		
-		$page = $this->request->query['page'] ?: 1;
+		$page = isset($this->request->query['page']) ? $this->request->query['page'] : 1;
 
 		//If the type part of the URL is a valid type (as defined above),
 		if (isset($this->_types[$type]))