You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New custom field form raises 7 undefined-variable warnings #428
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
Custom field form: initialise the field values for a new field