From 88c782a76bf81894d4ccca7d26f6afcec672ed59 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Feb 2017 19:28:48 +0200 Subject: [PATCH] 0 phone value bug fix --- src/app/backend/controllers/CustomersController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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