Update file.php

Implementation of the issue reported in the bugtracker

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=11410&tracker_item_id=29826

I also posted the same for the J3.0 (branch master)