Search the Community
Showing results for tags 'properly escaped'.
-
Hi Everyone, Any help is appreciated. I'm trying to get either current and future events (pages) or past ones and am getting an error. Here's my code ... if ($page->showPastEvents) { $items = $pages->find("template=event, eventStartDate < today, limit=$page->numberOfItemsPerPage, sort=-date"); } else { $items = $pages->find("template=event, eventStartDate >= today, limit=$page->numberOfItemsPerPage, sort=-date"); } I've also tried this: $today = strtotime(date('Y-m-d')); if ($page->showPastEvents) { $items = $pages->find("template=event, eventStartDate < $today, limit=$page->numberOfItemsPerPage, sort=-date"); } else { $items = $pages->find("template=event, eventStartDate >= $today, limit=$page->numberOfItemsPerPage, sort=-date"); } And here's the error I'm getting, thoughts? Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped? (in /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Selectors.php line 165) #0 /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Selectors.php(190): Selectors->create('eventStartDate', '', '>= 1374033600') #1 /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Selectors.php(63): Selectors->extractString('template=event,...') #2 /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Pages.php(143): Selectors->__construct('template=event,...') #3 [internal function]: Pages->___find('template=event,...') #4 /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Wire.php(271): call_user_func_array(Array, Array) #5 /var/www/vhosts/sharespost.com/sharespost.co.v1/wire/core/Wire.php(229): Wire->runHooks('find', Array) #6 /var/www/vhosts/sharespost.com/sharespost.co.v1/site/templates/basic-page-events.php(12): Wire->__call('find', Array) #7 /var/www/vhosts/sharespost.com/sharespost.co.v1/site/templates