Skip to content

PHP 8.5 error on editing a task without a time zone, removed the unused and broken TaskPicker and tasks/search/json - #338

Merged
luke- merged 1 commit into
developfrom
fix/338-edit-task-without-time-zone
Oct 6, 2026
Merged

luke- merged 1 commit into
developfrom
fix/338-edit-task-without-time-zone

Conversation

@yurabakhtin

Copy link
Copy Markdown
Contributor

https://github.com/humhub/humhub-internal/issues/1355:

Problem

  1. For an all-day task with time_zone = NULL, TaskForm::init() sets timeZone to null. TimeZoneDropdownAddition then uses null as an array key, which is an error on PHP 8.5, so the edit form returns 500. On older PHP versions the form silently shows a wrong time zone.
  2. tasks/search/json always returns 500. SearchController::actionJson() uses widgets\TaskPicker, an unfinished copy of UserPicker that references Yii::$app->task and a non-existent UserFilter. The model-side TaskPicker and TaskFilter are unfinished stubs too. Nothing in the module or in other modules uses them.

How to reproduce

  1. Take an all-day task with time_zone IS NULL, open it and click Edit (PHP 8.5, debug mode on).
  2. Open /tasks/search/json?cguid=<space guid> (friendship module enabled).

Fix

  1. Fall back to the current form time zone when the task has none.
  2. Remove the unused tasks/search/json action, widgets\TaskPicker, models\search\TaskPicker and models\search\TaskFilter.

…ed and broken TaskPicker and `tasks/search/json`
@yurabakhtin
yurabakhtin requested a review from luke- October 6, 2026 13:33
@luke-
luke- merged commit 096e263 into develop Oct 6, 2026
17 of 20 checks passed
@luke-
luke- deleted the fix/338-edit-task-without-time-zone branch October 6, 2026 15:50
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.

2 participants