[TYPO3-core] RFC: Bug 4035: Error message when uploading one or two files in file-browser (BE)

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Aug 31 20:22:25 CEST 2006


Wolfgang Klinger schrieb am 31.08.2006 13:01:

>  On Thu, 31 Aug 2006, Ernesto Baschny [cron IT] wrote the following:
>> Solution:
>> Attached patch. It keeps the log message that Karsten added to 4.0.1,
>> but will now compare the expected uploads with the actual done uploads.
> 
>  IMHO you should always use isset or array_key_exists or similar 
>  to check if an array index is available.

I guess that you mean this:

   if (!$_FILES['upload_'.$arr['data']]['name'])   {

This is not really checking if an array index exists, but if the 'name'
array key contains any data (meaning that a file was uploaded). If
absend, this particular upload-field was not filled with any filename.

Going to commit to SVN now, because I already got two +1. Thanks!

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list