Page 1 of 1

[solved] Zend_Filter_Input::__construct() had an error

Posted: Tue Feb 27, 2007 5:15 pm
by DaveTheAve
The error:
Catchable fatal error: Argument 1 passed to Zend_Filter_Input::__construct() must be an array, null given, called in W:\www\neoelite\index.php on line 25 and defined in W:\www\neoelite\Lib\Zend\Zend\Filter\Input.php on line 54
My bootstrap:

Code: Select all

Zend::register('FilterGet',      new Zend_Filter_Input($_GET,false));
Zend::register('FilterPost',     new Zend_Filter_Input($_POST,false));
Zend::register('FilterSession',  new Zend_Filter_Input($_SESSION,false));
This error wasn't happening in Zend Framework 0.7 but 0.8 started giving me this error.

Posted: Tue Feb 27, 2007 5:18 pm
by Luke
Is $_GET/$_POST/$_SESSION null?

Posted: Tue Feb 27, 2007 6:17 pm
by DaveTheAve
Yes, they are null but the problem is I still need this in the registry regardless. Like I said this wasn't a problem in Zend Framework 0.7.

Should I evade the problem by checking if they're null and if so set it to: "$var = array();"?

Posted: Tue Feb 27, 2007 6:29 pm
by Ambush Commander
That's what I'd recommend. Why are they null though?

Posted: Tue Feb 27, 2007 6:40 pm
by DaveTheAve
Don't know why exactly but it works now; thanks.