mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
avoid path being made absolute twice
This commit is contained in:
parent
a1edede41e
commit
387a974396
1 changed files with 1 additions and 5 deletions
|
@ -69,11 +69,7 @@ class MediaView extends View {
|
||||||
$name = $download = $id = $modified = $path = $cache = $mimeType = $compress = null;
|
$name = $download = $id = $modified = $path = $cache = $mimeType = $compress = null;
|
||||||
extract($this->viewVars, EXTR_OVERWRITE);
|
extract($this->viewVars, EXTR_OVERWRITE);
|
||||||
|
|
||||||
if (is_dir($path)) {
|
|
||||||
$path = $path . $id;
|
$path = $path . $id;
|
||||||
} else {
|
|
||||||
$path = APP . $path . $id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_array($mimeType)) {
|
if (is_array($mimeType)) {
|
||||||
$this->response->type($mimeType);
|
$this->response->type($mimeType);
|
||||||
|
|
Loading…
Reference in a new issue