Skip to content

Commit

Permalink
Cleaned the $path variable to fix mixed slashes
Browse files Browse the repository at this point in the history
I needed to clean the $path contents since it will be used later when trying to remove it from the subfolder's full path. It is cleaned inside of JFolder::folders, but only in the scope of that function. It needs to be cleaned before it is used by JFolder::folder
  • Loading branch information
mgilkes committed Nov 12, 2016
1 parent 972fa74 commit f73febd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/joomla/form/fields/folderlist.php
Expand Up @@ -198,6 +198,9 @@ protected function getOptions()
$options[] = JHtml::_('select.option', '', JText::alt('JOPTION_USE_DEFAULT', preg_replace('/[^a-zA-Z0-9_\-]/', '_', $this->fieldname)));
}

// Clean the $path contents
$path = JPath::clean($path);

// Get a list of folders in the search path with the given filter.
$folders = JFolder::folders($path, $this->filter, $this->recursive, true);

Expand Down

0 comments on commit f73febd

Please sign in to comment.