Today I found a bug in Joomla! 1.5.12 while working on a project. Since I have been developing this project on my computer at home, I had it installed on Joomla 1.5.11. Yesterday I completely finished the extension and decided to test it in a different environment, so I installed a new Joomla! development site on a live server. At this point I realized that Joomla 1.5.12 had been released, so I went through the simple installation process and installed the extension I had been working on. This is where the problems started.
Part of my installation involved uploading image files. When I got to this stage of testing the upload, it failed again and again. I gave up around 2 AM.
Today I looked into it again. After a little digging I found out that this method “JFile::upload( $file[‘tmp_name’], $new_file )” will ALWAYS return FALSE if FTP is enabled.
So onto the solution. Go to line 339 on file “/joomla/filesystem/file.php” and replace that line with this code:
$ret = true; unlink($src);
Post updated July 3, 2009 at 9:05 am. Removed chmod 777 of the uploaded file. This can be done as an extra step by the user.