Skip to content

N°10026 - Problem with apc-emulation when no file is present - #1040

Open
eespie wants to merge 1 commit into
developfrom
issue/10026_-_Problem_with_apc-emulation_when_no_file_is_present
Open

N°10026 - Problem with apc-emulation when no file is present#1040
eespie wants to merge 1 commit into
developfrom
issue/10026_-_Problem_with_apc-emulation_when_no_file_is_present

Conversation

@eespie

@eespie eespie commented Sep 4, 2026

Copy link
Copy Markdown
Member

N°10026 - Problem with apc-emulation when no file is present

Copilot AI balanced review requested due to automatic review settings September 4, 2026 08:26
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Sep 4, 2026
@eespie
eespie requested review from odain-cbd and removed request for Copilot September 4, 2026 08:27
@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes APC emulation when its cache directory contains no files by initializing the file list before counting and sorting it.

  • Prevents PHP type errors from applying array operations to null.
  • Preserves existing file discovery, counting, and eviction behavior.

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The initialization fixes the empty-directory path without changing control flow or file eviction semantics, and no repository rule violations were found.

Important Files Changed

Filename Overview
core/apc-emulation.php Initializes the cache-file collection as an empty array before enumeration, safely handling an empty cache directory.

Reviews (1): Last reviewed commit: "N°10026 - Problem with apc-emulation whe..." | Re-trigger Greptile

Comment thread core/apc-emulation.php
return;
}
if (!self::$aFilesByTime) {
self::$aFilesByTime = [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably go into the ListFilesByTime method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants