Skip to content

New custom field form raises 7 undefined-variable warnings #428

Closed

Description

@caseysoftware

Found on the dev-6.0.0 branch (local, at 9bd3a1e0) during the lib/ cleanup. It may be on master too: the same code is there.

modules/system/customfields/addedit.php only sets $field_name, $field_description, $field_htmltype, $field_extratags, $field_order and $field_published when editing an existing field (L39–55). The form (L117–151) echoes them unconditionally. Opening "add custom field" for any module (?m=system&u=customfields&a=addedit&module=N) logs 7 "Undefined variable" warnings.

Fix: initialise them to defaults ('', 0, 'textinput', …) before the if ($field_id) block.

Activity

  1. added
    php
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 21, 2026
    36f59c6
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

    php

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions