Skip to content

Can't access kirby() from the config file #1724

@lukasbestle

Description

@lukasbestle

Describe the bug

If kirby() (or any object depending on it) is called from within config.php, Kirby runs into an endless loop as it seems to load the config file over and over.

To Reproduce

Use the following config.php:

<?php

kirby();

return [
  // empty
];

Expected behavior

The kirby() object should already be accessible from the config.

Kirby Version

Kirby 3.1.3

Additional context

Forum thread: https://forum.getkirby.com/t/out-of-memory-with-config-variable/13946?u=lukasbestle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions