[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 19:46:10 CEST 2006


Dmitry Dulepov schrieb am 31.08.2006 13:43:

> Ernesto Baschny [cron IT] wrote:
>> This is a SVN patch request.
>>
>> This was fixed during T3DD, I just forgot to bring it up in the
>> core-list for discussion. Maybe still in time for 4.0.2?
>>
>> Problem:
>> You get an error message "2: No file was uploaded!" when uploading one
>> or two files in file-browser (BE).
> 
> Patch generally works (file upload possible) but I got a PHP warning
> after upload:
> =========================
> Warning:
> parse_url(/typo3/file_list.php?id=C:/Projects/t3test/fileadmin/user_upload)
> [function.parse-url]: Unable to parse url in
> C:\Projects\t3test\typo3\template.php on line 437
> =========================

Do you only get the error with the patch applied? I cannot imagine that
this is really related. Try without the patch and filling all
upload-fields with some upload-file to see if you get the same warnings.

I could also not reproduce that warning here.

My PHP version (4.3.8-Linux) seems to be able to parse_url your string:

$p =
parse_url('/typo3/file_list.php?id=C:/Projects/t3test/fileadmin/user_upload');
print_r($p);

Array
(
    [scheme] => /typo3/file_list.php?id=C
    [path] => /Projects/t3test/fileadmin/user_upload
)

Which is not really correct, but strange that it brings a warning in
your case.

parse_url has in its docu: " On seriously malformed URLs, parse_url()
may return FALSE and emit a E_WARNING.". I think we should handle the
cases without a warning: calling @parse_url and doing our handling if it
is false. In this particular case the "path" is just bogus, so the
generated shortcut icon is not working anyway.


Cheers,
Ernesto



More information about the TYPO3-team-core mailing list