ZapMachine/kanban/tasks/023-anchor-zap-app-base-dir-to-dir-make-getzaptemplate.md

813 B

id title status priority created updated started completed tags claimed_by claimed_at class
23 Anchor ZAP_APP_BASE_DIR to __DIR__, make getZAPTemplate throw done low 2026-07-17T03:58:37.157613187+02:00 2026-07-19T21:39:02.781954542+02:00 2026-07-19T21:39:02.783424942+02:00 2026-07-19T21:39:02.783424942+02:00
cleanup
rain-raven 2026-07-19T21:39:02.781954542+02:00 standard

From framework review (docs/framework_review.md), P2-8/9. Two fixes in conf/init.php:

  1. ZAP_APP_BASE_DIR = realpath('.'.DIRECTORY_SEPARATOR.'..') is cwd-dependent — breaks if entry point is not www/ or cli_scripts/. Use realpath(DIR . '/..') instead.
  2. getZAPTemplate returns ERROR_PREFIX . 'No template' string on missing file instead of throwing — inconsistent with other error paths. Make it throw.