"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Resources/contao/models/FilesModel.php" between
contao-4.11.3.tar.gz and contao-4.11.4.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

FilesModel.php  (contao-4.11.3):FilesModel.php  (contao-4.11.4)
skipping to change at line 258 skipping to change at line 258
/** /**
* Find a file by its path * Find a file by its path
* *
* @param string $path The path * @param string $path The path
* @param array $arrOptions An optional options array * @param array $arrOptions An optional options array
* *
* @return FilesModel|null The model or null if there is no file * @return FilesModel|null The model or null if there is no file
*/ */
public static function findByPath($path, array $arrOptions=array()) public static function findByPath($path, array $arrOptions=array())
{ {
if (!\is_string($path))
{
return null;
}
$projectDir = System::getContainer()->getParameter('kernel.projec t_dir'); $projectDir = System::getContainer()->getParameter('kernel.projec t_dir');
$uploadPath = System::getContainer()->getParameter('contao.upload _path'); $uploadPath = System::getContainer()->getParameter('contao.upload _path');
if (Path::isBasePath($projectDir, $path)) if (Path::isBasePath($projectDir, $path))
{ {
$path = Path::makeRelative($path, $projectDir); $path = Path::makeRelative($path, $projectDir);
} }
if (!Path::isBasePath($uploadPath, $path)) if (!Path::isBasePath($uploadPath, $path))
{ {
 End of changes. 1 change blocks. 
0 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)