<commit_before><?php

namespace Deployer;

task('buffer:stop', function () {
    $releasesList = get('releases_list');
    // Remove lock files also from previous release because it can be still read by apache/nginx after switching.
    // get('releases_list') is cached by deployer on first call in other task so it does not have the latest release
    // this is why $releasesList[0] have last release and not current.
    $overwriteReleases = ['current'];
    if (!empty($releasesList[0])) {
        $overwriteReleases[] = $releasesList[0];
    }
    foreach ($overwriteReleases as $overwriteRelease) {
        $overwriteReleasePath = get('deploy_path') . '/' . $overwriteRelease;
        foreach (get('buffer_config') as $key => $buffer) {
            if (!isset($buffer['entrypoint_filename'])) {<commit_msg>[BUGFIX] Check for existance of $releasesList[0] before using<commit_after><?php

namespace Deployer;

task('buffer:stop', function () {
    $releasesList = get('releases_list');
    // Remove lock files also from previous release because it can be still read by apache/nginx after switching.
    // get('releases_list') is cached by deployer on first call in other task so it does not have the latest release
    // this is why $releasesList[0] have last release and not current.
    $overwriteReleases = ['current'];
    if (isset($releasesList[0])) {
        $overwriteReleases[] = 'releases/' . $releasesList[0];
    }
    foreach ($overwriteReleases as $overwriteRelease) {
        $overwriteReleasePath = get('deploy_path') . '/' . $overwriteRelease;
        foreach (get('buffer_config') as $key => $buffer) {
            if (!isset($buffer['entrypoint_filename'])) {
{'fraction_non_alphanumeric': 0.12566686425607587, 'fraction_numerical': 0.004149377593360996, 'mean_word_length': 3.741573033707865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '804161', 'n_tokens_mistral': 495, 'n_tokens_neox': 464, 'n_words': 154}