Zend_InputFilter->getRaw($key) - Undefined index

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_InputFilter->getRaw($key) - Undefined index

Jeunejean Pierre
Hi,

I'm currently writting an CMS application, and some input fields are
generated  at run-time on client  side  (by javascript actually),
and my form save method is a generic one (since the form is
automatically generated in CMS context)
In brief, the field name may not be present in the $_POST array, which
is  simple  to check as
if (isset($_POST[$key])

but impossible with the actual implementation Zend_InputFilter->getRaw($key)

    public function getRaw($key)
    {
        return $this->_source[$key];
    }
 
So could we have something like:

  public function getRaw($key)
    {
        if (isset($this->_source[$key])) {
            return $this->_source[$key];
        }
        return null;
    }

--
sincerely yours,
mit freundlichen Grüßen,
cordialement,

Pierre Jeunejean

A D N E X U S
Interactive Media Agency

Rue Patenier, 38
B- 4000 Liege (bureau)

Wirtzfeld, 3A
B- 4760 Büllingen

GSM +32 (0)478 55 65 86
tel +32 (0)4 225 20 84
Skype user name: jeunejeanpierre
[hidden email]

BE 863.696.611

Reply | Threaded
Open this post in threaded view
|

Re: Zend_InputFilter->getRaw($key) - Undefined index

Chris Shiflett-3
Hi Pierre,

> if (isset($_POST[$key])

This is a missing feature of Zend_Filter_Input that will be added.

Chris