joomla/joomla-platform — pull request #1798 by elinw (2013-01-11 19:13:58+00:00)
Title: Fix a problem where using a non-string value for path caused all files t...

...o be deleted.

The JFolder::delete method calls JPath::Clean which uses a trim to clean $path. If the trim gets an array as an argument it ends up throwing a PHP warning and setting $path to JPATH_ROOT and returning that to delete, which then deletes all of the folders from the JPATH_ROOT. This fix just adds an exception to clean and then catches it in delete.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=29810