Commit 88c782a76bf81894d4ccca7d26f6afcec672ed59

Authored by Alex Savenko
1 parent 10947d84

0 phone value bug fix

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/app/backend/controllers/CustomersController.php
... ... @@ -20,7 +20,7 @@ class CustomersController extends \Phalcon\Mvc\Controller
20 20 $search_phone = $this->request->getPost('search_phone', 'string', NULL);
21 21 $this->session->set('search_name', $search_name);
22 22 $this->session->set('search_phone', $search_phone);
23   - if (!empty($search_name) && !empty($search_phone)) {
  23 + if (!empty($search_name) && isset($search_phone)) {
24 24 $data = $this->models->getCustomers()->getDataByNameAndPhone($search_name, $search_phone);
25 25 $total = 1;
26 26 }
... ... @@ -28,7 +28,7 @@ class CustomersController extends \Phalcon\Mvc\Controller
28 28 $data = $this->models->getCustomers()->getDataByName($search_name);
29 29 $total = 1;
30 30 }
31   - elseif(!empty($search_phone)) {
  31 + elseif(isset($search_phone)) {
32 32 $data = $this->models->getCustomers()->getDataByPhone($search_phone);
33 33 $total = 1;
34 34 }
... ...