Skip to content

Commit 750db37

Browse files
author
kodiakhq
committed
deploy: 32e9fbc
1 parent 15fd738 commit 750db37

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

files/redaxo-main/redaxo/src/core/boot.php.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ require_once rex_path::core('functions/function_rex_globals.php');
9292
require_once rex_path::core('functions/function_rex_other.php');
9393

9494
// ----------------- VERSION
95-
rex::setProperty('version', '5.17.1');
95+
rex::setProperty('version', '5.18.0');
9696

9797
$cacheFile = rex_path::coreCache('config.yml.cache');
9898
$configFile = rex_path::coreData('config.yml');

files/redaxo-main/redaxo/src/core/lib/be/controller.php.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,16 @@ class rex_be_controller
450450
*/
451451
public static function includeCurrentPageSubPath(array $context = [])
452452
{
453-
$path = rex_type::string(self::requireCurrentPageObject()->getSubPath());
453+
$page = self::requireCurrentPageObject();
454+
$path = $page->getSubPath();
455+
if (null === $path) {
456+
throw new rex_exception(sprintf(
457+
$page instanceof rex_be_page_main
458+
? 'Current page "%s" is a main page and therefore has no sub-path.'
459+
: 'Current page "%s" does not have a sub-path.',
460+
$page->getFullKey(),
461+
));
462+
}
454463

455464
if ('.md' !== strtolower(substr($path, -3))) {
456465
return self::includePath($path, $context);
@@ -471,7 +480,7 @@ class rex_be_controller
471480
$content = $fragment->parse('core/page/docs.php');
472481

473482
$fragment = new rex_fragment();
474-
$fragment->setVar('title', self::requireCurrentPageObject()->getTitle(), false);
483+
$fragment->setVar('title', $page->getTitle(), false);
475484
$fragment->setVar('body', $content, false);
476485
echo $fragment->parse('core/page/section.php');
477486

0 commit comments

Comments
 (0)