Skip to content

Calendars and task scheduling fatal if the Holiday add-on is marked active but its files are missing #452

Closed

Description

@caseysoftware

w2p_Utilities_Date::isWorkingDay() (classes/w2p/Utilities/Date.class.php) checks whether the holiday module is active and, if it is, does an unguarded:

require_once W2P_BASE_DIR."/modules/holiday/holiday_functions.class.php";

Holiday is an add-on (web2project/modules-holiday), not part of core. If its folder is removed or never deployed while the modules row still has mod_active = 1 (e.g. after a server move, or deleting the folder instead of uninstalling), the require_once is a fatal error. isWorkingDay() is called by task scheduling and duration code (Date.class.php, tasks.class.php, cleanup_functions.php) and by the calendar views, so tasks and calendars stop loading.

Fix: treat the module as inactive unless the file exists and defines HolidayFunctions (e.g. is_file() before the require_once, then class_exists('HolidayFunctions')). It's also worth confirming the add-on still ships holiday_functions.class.php with a static HolidayFunctions::isHoliday() for v5.

Activity

  1. added
    php
    on Oct 23, 2026
  2. added a commit that references this issue on Oct 24, 2026
    4ef0e61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityphp

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions