<commit_before><?php
/**
 * Resize images on the fly using CImage, configuration is made in file named.
 *
 */


/**
 * Default configuration options, can be overridden in own config-file.
 *
 * @param string $msg to display.
 *
 * @return void
 */
function errorPage($msg)
{
    header("Status: 404 Not Found");
    die('img.php say 404: ' . $msg);
}



/**
 * Custom exception handler.
 */
set_exception_handler(function ($exception) {
    errorPage("<p><b>img.php: Uncaught exception:</b> <p>" . $exception->getMessage() . "</p><pre>" . $exception->getTraceAsString(), "</pre>");
});



/**<commit_msg>Now sends 404 header as it should #32 when providing a error page<commit_after><?php
/**
 * Resize images on the fly using CImage, configuration is made in file named.
 *
 */


/**
 * Default configuration options, can be overridden in own config-file.
 *
 * @param string $msg to display.
 *
 * @return void
 */
function errorPage($msg)
{
    header("HTTP/1.0 404 Not Found");
    die('img.php say 404: ' . $msg);
}



/**
 * Custom exception handler.
 */
set_exception_handler(function ($exception) {
    errorPage("<p><b>img.php: Uncaught exception:</b> <p>" . $exception->getMessage() . "</p><pre>" . $exception->getTraceAsString(), "</pre>");
});



/**
{'fraction_non_alphanumeric': 0.1789390340459224, 'fraction_numerical': 0.015043547110055424, 'mean_word_length': 3.596363636363636, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, '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': '5347292', 'n_tokens_mistral': 417, 'n_tokens_neox': 392, 'n_words': 118}