Skip to content

fix(core): CLI cookie warning headers already sent - #2452

Merged
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix/cli-headers-already-sent
Sep 9, 2026
Merged

fix(core): CLI cookie warning headers already sent#2452
Seiger merged 1 commit into
evolution-cms:3.5.xfrom
elcreator:fix/cli-headers-already-sent

Conversation

@elcreator

Copy link
Copy Markdown

The CLI installer includes index.php after it has already printed, so PHP considers the headers sent by the time the session settings are applied. Every CLI install therefore emitted four warnings:

Warning: ini_set(): Session ini settings cannot be changed after headers
have already been sent in index.php on line 86
Warning: ini_set(): Session ini settings cannot be changed after headers
have already been sent in core/functions/session_proxy.php on line 61
Warning: session_id(): Session ID cannot be changed after headers have
already been sent in core/functions/session_proxy.php on line 67

All of them address cookies and headers, which do not exist on CLI. Skip them there; $_SESSION is still filled by the merge that follows in EvoSessionProxy::init(), so nothing else changes.

The CLI installer includes index.php after it has already printed, so PHP
considers the headers sent by the time the session settings are applied.
Every CLI install therefore emitted four warnings:

  Warning: ini_set(): Session ini settings cannot be changed after headers
  have already been sent in index.php on line 86
  Warning: ini_set(): Session ini settings cannot be changed after headers
  have already been sent in core/functions/session_proxy.php on line 61
  Warning: session_id(): Session ID cannot be changed after headers have
  already been sent in core/functions/session_proxy.php on line 67

All of them address cookies and headers, which do not exist on CLI. Skip
them there; $_SESSION is still filled by the merge that follows in
EvoSessionProxy::init(), so nothing else changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RYzFvo3wBzPhLzhG4Dkzk2
@Seiger
Seiger merged commit 3094a79 into evolution-cms:3.5.x Sep 9, 2026
6 checks passed
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.

2 participants