<commit_before><?php
namespace Grav\Common;

use Tracy\Debugger;

require_once(__DIR__ . '/system/defines.php');

if (!ini_get('date.timezone')) {
    date_default_timezone_set('GMT');
}

// Use output buffering to prevent headers from being sent too early.
ob_start();

// Register all the classes to the auto-loader.
require_once(VENDOR_DIR .'autoload.php');
require_once(SYSTEM_DIR .'autoload.php');

// Create Required Folders if they don't exist
if (!file_exists(LOG_DIR)) mkdir(LOG_DIR);
if (!file_exists(CACHE_DIR)) mkdir(CACHE_DIR);

// Start the timer and enable debugger in production mode as we do not have system configuration yet.
// Debugger catches all errors and logs them, for example if the script doesn't have write permissions.
Debugger::timer();
Debugger::enable(Debugger::PRODUCTION, LOG_DIR);

// Register all the Grav bits into registry.
$registry = Registry::instance();
$registry->store('Grav', new Grav);
$registry->store('Uri', new Uri);
$registry->store('Config', Config::instance(CACHE_DIR . 'config.php'));
$registry->store('Cache', new Cache);
$registry->store('Twig', new Twig);<commit_msg>Added auto-create for missing images/ folder<commit_after><?php
namespace Grav\Common;

use Tracy\Debugger;

require_once(__DIR__ . '/system/defines.php');

if (!ini_get('date.timezone')) {
    date_default_timezone_set('GMT');
}

// Use output buffering to prevent headers from being sent too early.
ob_start();

// Register all the classes to the auto-loader.
require_once(VENDOR_DIR .'autoload.php');
require_once(SYSTEM_DIR .'autoload.php');

// Create Required Folders if they don't exist
if (!file_exists(LOG_DIR)) mkdir(LOG_DIR);
if (!file_exists(CACHE_DIR)) mkdir(CACHE_DIR);
if (!file_exists(IMAGES_DIR)) mkdir(IMAGES_DIR);

// Start the timer and enable debugger in production mode as we do not have system configuration yet.
// Debugger catches all errors and logs them, for example if the script doesn't have write permissions.
Debugger::timer();
Debugger::enable(Debugger::PRODUCTION, LOG_DIR);

// Register all the Grav bits into registry.
$registry = Registry::instance();
$registry->store('Grav', new Grav);
$registry->store('Uri', new Uri);
$registry->store('Config', Config::instance(CACHE_DIR . 'config.php'));
$registry->store('Cache', new Cache);
$registry->store('Twig', new Twig);
{'fraction_non_alphanumeric': 0.1418744625967326, 'fraction_numerical': 0.0, 'mean_word_length': 5.864306784660767, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1288503', 'n_tokens_mistral': 717, 'n_tokens_neox': 706, 'n_words': 219}