Exception detected!

Warning: count(): Parameter must be an array or an object that implements Countable

500Internal Server Error -ContextErrorException

Stack Trace

  1. insrc/PN/Bundle/TravelBundle/Repository/PackageRepository.php at line 308 -
    1.             $clause .= $where " ( l.id = $searchFiltered->location )";
    2.         }
    3.         if (isset($searchFiltered->country) and count($searchFiltered->country) > 0) {
    4.             $clause .= SQL:: inCreate($searchFiltered->country'c.country_id'$where);
    5.         }
  2. at ErrorHandler->handleError ('2', 'count(): Parameter must be an array or an object that implements Countable', '/home/oriental/public_html/n_demo/src/PN/Bundle/TravelBundle/Repository/PackageRepository.php', '308', array('search' => object(stdClass), 'count' => false, 'sort' => null, 'startLimit' => '0', 'endLimit' => '3', 'connection' => object(Connection), 'where' => ' AND ', 'clause' => ' WHERE (( DATEDIFF( pp.start_date , '2025-10-13') >= 0 ) OR ( DATEDIFF( pp.end_date , '2025-10-13') >= 0)) AND ( p.deleted = 0 ) AND ( p.publish = 1 )', 'sortSQL' => array(' RAND() '), 'searchFiltered' => object(stdClass), 'value' => '2025-10-13', 'key' => 'arrivalDate'))
  3. at count ('1')
    insrc/PN/Bundle/TravelBundle/Repository/PackageRepository.php at line 308 +
  4. at PackageRepository->filter (object(stdClass), false, null, '0', '3')
    insrc/PN/Bundle/CruiseBundle/Controller/FrontEnd/CruiseController.php at line 71 +
  5. at CruiseController->filterAction (object(Request), '1', null)
    inapp/bootstrap.php.cache at line 3272 +
  6. at HttpKernel->handleRaw (object(Request), '1')
    inapp/bootstrap.php.cache at line 3231 +
  7. at HttpKernel->handle (object(Request), '1', true)
    inapp/bootstrap.php.cache at line 3385 +
  8. at ContainerAwareHttpKernel->handle (object(Request), '1', true)
    inapp/bootstrap.php.cache at line 2585 +
  9. at Kernel->handle (object(Request))
    inweb/app.php at line 15 +

Logs  -

    Stack Trace (Plain Text) +