Try passing in your options array within its own array. I believe it works
similarly to the call_user_func_array() function, where if the argument
passed to the function is an array it needs to be wrapped in an array.
$subject = $this->addElement('text', 'subject', array(
    'filters'               => array(
        'StringTrim',
        array(
            'filter'        => 'HtmlEntities',
            'options'       => array(array(
                'quotestyle'    =>  ENT_QUOTES
            ))
        ),
        'Alnum'
    ),

--
Hector


On Sun, Sep 27, 2009 at 6:18 PM, Patrick Lorber <[email protected]>wrote:

>
> Hello,
>
> I've recently updated from 1.8 to 1.9.3PL  I have a form that I use for
> allowing the creation of newsletters.  I'm getting an error that states:
>  Support for multiple arguments is deprecated in favor of a single options
> array in
> C:\Server\Apache2\htdocs\bible9\library\Zend\Filter\HtmlEntities.php on
> line
> 66
>
>
> My original Code looked like this:
>
>
>        /**
>         * This is where the Form is initialized and Set up
>         */
>        public function init(){
>                $subject = $this->addElement('text', 'subject', array(
>                        'filters'               => array(
>                                'StringTrim',
>                                array( 'HtmlEntities',   ENT_QUOTES),
>                                'Alnum'
>                        ),
>
>
> So,  I then changed the code to include an array for the filter options as
> follows:
>
>
>        /**
>         * This is where the Form is initialized and Set up
>         */
>        public function init(){
>                $subject = $this->addElement('text', 'subject', array(
>                        'filters'               => array(
>                                'StringTrim',
>                                array(
>                                        'filter'        => 'HtmlEntities',
>                                        'options'       =>      array(
>                                                'quotestyle'    =>
>  ENT_QUOTES
>                                        )
>                                ),
>                                'Alnum'
>                        ),
>
>
> For some reason I am still getting the same error as before.  It appears
> that even with the later code that the integer 3 is being passed to the
> consructor of Zend_Filter_HtmlEntities.  Perhaps I have misunderstood the
> usage.  Could someone please help
>
> --
> View this message in context:
> http://www.nabble.com/Zend_Filter_HtmlEntities-options-problem-tp25639456p25639456.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>

Reply via email to