Skip to content

Commit 3ecc213

Browse files
committed
Presenter: do not shorten file names in exceptions
1 parent 42ab306 commit 3ecc213

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/Application/UI/Presenter.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ public function sendTemplate(): void
439439
}
440440

441441
if (!$template->getFile()) {
442-
$file = preg_replace('#^.*([/\\\\].{1,70})\z#U', "\u{2026}\$1", reset($files));
443-
$file = strtr($file, '/', DIRECTORY_SEPARATOR);
442+
$file = strtr(reset($files), '/', DIRECTORY_SEPARATOR);
444443
$this->error("Page not found. Missing template '$file'.");
445444
}
446445
}
@@ -466,8 +465,7 @@ public function findLayoutTemplateFile(): ?string
466465
}
467466

468467
if ($this->layout) {
469-
$file = preg_replace('#^.*([/\\\\].{1,70})\z#U', "\u{2026}\$1", reset($files));
470-
$file = strtr($file, '/', DIRECTORY_SEPARATOR);
468+
$file = strtr(reset($files), '/', DIRECTORY_SEPARATOR);
471469
throw new Nette\FileNotFoundException("Layout not found. Missing template '$file'.");
472470
}
473471
return null;

0 commit comments

Comments
 (0)