I am using CakeDC search plugin in a CakePHP 2 app.  Here is the code
in my model:
public $filterArgs = array(
        array('name'=>'min_age', 'type'=>'expression',
'method'=>'returnNumber',
                'field'=>'datediff(current_date(), User.dob)/365.25 >= ?'),
        array('name'=>'max_age', 'type'=>'expression',
'method'=>'returnNumber',
                'field'=>'datediff(current_date(), User.dob)/365.25 <= ?')
);
function returnNumber($arg, $name) {
        return $arg[$name['name']];
}

When I first go to the page, underneath the table in the search view,
just before "previous" and "next", I get the following error:
Warning (2): vsprintf() [function.vsprintf]: Too few arguments [CORE
\Cake\basics.php, line 513]

Then when I click on "search" I also get the following error:
Warning (2): Invalid argument supplied for foreach() [APP\Controller
\Component\PrgComponent.php, line 76]

Any ideas?
Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to