Bug in 2.2.1 ( on 2014–05–27) – addUpload

5 years ago

motorcb
Member | 525
+
0
-

I have simple form:

////////////////////////////////////////////////////////////////////////////
protected function createComponentMyForm()
{
    $form = new Form();

    $form->addUpload('avatar', 'Avatar:');

    $form->addSubmit( 'submit', 'Save' );

    $form->onSuccess[] = $this->saveMyFormSucceeded;

    return $form;
}

public function saveMyFormSucceeded( $form )
{
    $values = $form->getValues();

    dump( $values["avatar"] );
    dump( $values["avatar"]->isOk() );
    dump( $values["avatar"]->getContents() );
    exit();
}
////////////////////////////////////////////////////////////////////////////

dump( $values[“avatar”] );
Have allways (i tried many different files): error private ⇒ 6
dump( $values[“avatar”]->isOk() ); is allways FALSE
dump( $values[“avatar”]->getContents() ); is allways NULL

Bug? Why?

5 years ago

Jan Endel
Member | 1024
+
0
-