diff --git a/src/app/backend/controllers/CustomersController.php b/src/app/backend/controllers/CustomersController.php index bcb42ed..b26f247 100644 --- a/src/app/backend/controllers/CustomersController.php +++ b/src/app/backend/controllers/CustomersController.php @@ -20,7 +20,7 @@ class CustomersController extends \Phalcon\Mvc\Controller $search_phone = $this->request->getPost('search_phone', 'string', NULL); $this->session->set('search_name', $search_name); $this->session->set('search_phone', $search_phone); - if (!empty($search_name) && !empty($search_phone)) { + if (!empty($search_name) && isset($search_phone)) { $data = $this->models->getCustomers()->getDataByNameAndPhone($search_name, $search_phone); $total = 1; } @@ -28,7 +28,7 @@ class CustomersController extends \Phalcon\Mvc\Controller $data = $this->models->getCustomers()->getDataByName($search_name); $total = 1; } - elseif(!empty($search_phone)) { + elseif(isset($search_phone)) { $data = $this->models->getCustomers()->getDataByPhone($search_phone); $total = 1; } -- libgit2 0.21.4