2009年7月26日星期日

Re: [fw-mvc] Ensuring that Zend_File_Transfer will always return an array

setIsArray has no effect on non form data.

A simple
if (isString($name)) {
$name = array($name);
}

does the trick in your case.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message -----
From: "Abraham Block" <atblock@gmail.com>
To: "Zend Framework MVC" <fw-mvc@lists.zend.com>
Sent: Sunday, July 26, 2009 11:02 PM
Subject: [fw-mvc] Ensuring that Zend_File_Transfer will always return an
array


> I'm implementing one of these dynamic "add another file" thingies via
> javascript, so I can never be sure how many files my clients are
> uploading.
> That being said, my code is expecting an array. If there is only one file
> uploaded though, getFileName returns a string.
> I'm currently using Zend_File_Transfer through the form helper, and i've
> set
> "setIsArray(true)". But that doesn't seem to help.
>

没有评论: