fix(installer): 설치 시작 즉시 빈 응답 — escapeEnvValue 재선언 fatal
직전 커밋이 install-process.php 에 installer-runtime.php require 를 functions.php 앞에 추가하면서 발생한 회귀. installer-runtime.php 는 escapeEnvValue 를 function_exists 가드와 함께 polyfill 로 선언하는데, functions.php 는 같은 함수를 가드 없이 선언하고 있었다. 로드 순서가 뒤바뀌자 "Cannot redeclare escapeEnvValue" fatal 이 발생하고, JSON 이 출력되기 전에 스크립트가 죽어 응답 본문이 비었다. 브라우저의 res.json 이 이를 "Unexpected end of JSON input" 으로 보고해 설치 시작 즉시 실패했다 (SSE / 폴링 양 모드 — 둘 다 install-process.php 를 경유). 수정: - functions.php 의 escapeEnvValue 에 function_exists 가드 추가 (근본 방어 — require 순서만 되돌리면 다음 사람이 순서를 바꿀 때 재발한다) - install-process.php 의 require 순서를 다른 엔드포인트와 동일하게 정렬 인스톨러 전역 전수 스캔 결과 중복 선언 함수는 escapeEnvValue 하나뿐이며 이제 양쪽 모두 가드를 갖는다. 회귀 가드: InstallerIncludeOrderTest — 격리 프로세스로 로드 순서를 바꿔가며 fatal 부재 검증 + 중복 선언 함수의 가드 보유를 정적 검사 (수정 전 3/4 fail 확인).
This commit is contained in:
1 parent
9be8faaea2
commit
1922003917
3 files changed
+213
-27
No files matched your search
@@ -15,8 +15,12 @@
|
||||
require_once __DIR__.'/../includes/config.php';
|
||||
require_once __DIR__.'/../includes/session.php';
|
||||
require_once __DIR__.'/../includes/installer-state.php';
|
||||
require_once __DIR__.'/../includes/installer-runtime.php';
|
||||
// functions.php 를 installer-runtime.php 보다 먼저 로드한다 — 다른 인스톨러
|
||||
// 엔드포인트(finalize-env.php / task-runner.php)와 동일한 순서.
|
||||
// installer-runtime.php 는 escapeEnvValue() 를 function_exists 가드와 함께
|
||||
// polyfill 로 선언하므로, functions.php 가 먼저 와야 그 가드가 제 역할을 한다.
|
||||
require_once __DIR__.'/../includes/functions.php';
|
||||
require_once __DIR__.'/../includes/installer-runtime.php';
|
||||
require_once __DIR__.'/_guard.php';
|
||||
installer_guard_or_410();
|
||||
|
||||
|
||||
Reference in new issue
Block a user