Skip to content

Add null check for preview file path before is_file validation - #694

Draft
alesak wants to merge 4 commits into
pimcore:1.10from
WebForPeople:1.10
Draft

alesak wants to merge 4 commits into
pimcore:1.10from
WebForPeople:1.10

Conversation

@alesak

@alesak alesak commented Sep 14, 2026

Copy link
Copy Markdown

Changes in this pull request

Resolves #
fix for passing null to is_file function

Additional info

Copilot AI balanced review requested due to automatic review settings September 14, 2026 05:57
@pimcore-deployments
pimcore-deployments marked this pull request as draft September 14, 2026 05:57
@pimcore-deployments

Copy link
Copy Markdown
Collaborator

🚫 Issue-link guardrail failed — this PR has been converted to draft.

Every PR must reference a tracking issue in pimcore/platform-version so the change stays traceable.

  • No issue in pimcore/platform-version is linked.

Add the link with a keyword in the PR description (not in a comment): https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests

When fixed, press Ready for review to re-run the checks.

Copilot AI left a comment

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.

🟡 Changes recommended

Two other calls still pass the same nullable path directly to is_file().

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a null guard before validating a local preview file path.

Changes:

  • Prevents one nullable path from reaching is_file().
File summaries
File Description
src/Controller/ConfigDataObjectController.php Adds the preview-path guard.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

) {
$previewFilePath = $this->previewService->getLocalPreviewFile($configName, $this->getPimcoreUser());
if (is_file($previewFilePath)) {
if ($previewFilePath && is_file($previewFilePath)) {
@pimcore-deployments

Copy link
Copy Markdown
Collaborator

👋 Friendly reminder — this pull request is still a draft.

A guardrail converted it to draft because something needed fixing, and there has been no activity since. If nothing changes, it will be closed in 14 days.

To keep it open, just take one of these steps:

  • Address the guardrail comment above, then press Ready for review.
  • Or leave a comment explaining that it is still in progress — any activity resets this timer.

Closing is not rejection: the branch and the discussion stay, and the PR can be reopened at any time.

When fixed, press Ready for review to re-run the checks.

@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Critical Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants