Skip to content

Commit

Permalink
[5.4] Fixed duplicate // for public_path (#19731)
Browse files Browse the repository at this point in the history
* Fixed duplicate // for public_path

* Changed nested ternary to ltrim
  • Loading branch information
Rogier Verbrugge authored and taylorotwell committed Jun 23, 2017
1 parent d043f49 commit 8d54d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ function policy($class)
*/
function public_path($path = '')
{
return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.$path : $path);
return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);
}
}

Expand Down

0 comments on commit 8d54d7f

Please sign in to comment.