Skip to content

A5: Settings save uses removed w2p_Core_Config and misreads store()'s result #6

Open

Description

@caseysoftware

do_holiday_settings_aed.php saves cal_working_days, cal_day_start and cal_day_end with new w2p_Core_Config(). The class is w2p_System_Config in v5.

It also does if (($msg = $obj->store($AppUI))). store() returns a bool now, so a successful save is reported as an error and the handler redirects before saving the remaining settings.

Files: do_holiday_settings_aed.php L28–66

Fix: better to remove this copy of the settings entirely (#16); otherwise use w2p_System_Config and test store() as a bool.

Evidence: found by reading the code against master; not reproduced on a running install.
Effort: XS

Part of #1.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions