Skip to content

Fix PHP warning: Undefined array key "updateable"#16935

Merged
opengeek merged 2 commits intomodxcms:3.xfrom
Jako:patch-3
May 5, 2026
Merged

Fix PHP warning: Undefined array key "updateable"#16935
opengeek merged 2 commits intomodxcms:3.xfrom
Jako:patch-3

Conversation

@Jako
Copy link
Copy Markdown
Contributor

@Jako Jako commented Mar 26, 2026

What does it do?

Initialise the array key updateable before using it.

Why is it needed?

PHP warning: Undefined array key "updateable"

@Jako Jako requested review from Mark-H and opengeek as code owners March 26, 2026 07:37
@smg6511
Copy link
Copy Markdown
Collaborator

smg6511 commented Mar 26, 2026

Hey @Jako - Consider handling this the same way it is done in the process method L40, changing L128 to:

$categoryData = [
    'updateable' => 0
];

...and leave the line you changed as it was before.

Also, let me know if there happens to be a related Issue. Thx!

@Jako
Copy link
Copy Markdown
Contributor Author

Jako commented Mar 26, 2026

You can fix this however you want.

Copy link
Copy Markdown
Member

@opengeek opengeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with the changes that were suggested.

@opengeek opengeek merged commit ba74c73 into modxcms:3.x May 5, 2026
6 checks passed
@opengeek opengeek added this to the v3.2.1 milestone May 5, 2026
@Jako Jako deleted the patch-3 branch May 6, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants