Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
27 Nov 2026

Pull Request for Issue # .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

This change was created with the help of AI (Claude Code).

Summary of Changes

In plg_task_weblinks::checkWeblinks():

$httpTimeout = (int) $event->getArgument('params')->http_timeout ?? 8;
$batchSize   = (int) $event->getArgument('params')->batch_size ?? 3;

The cast binds tighter than ??, so the expression is ((int) $params->http_timeout) ?? 8 and the default is never applied. When the parameters are missing (e.g. a task created before the parameters existed, or created via API/CLI) this results in an "Undefined property" warning and the value 0. batch_size = 0 means setLimit(0), i.e. all weblinks in one run, and a timeout of 0 means no HTTP timeout at all.

The values are now read as max(1, (int) ($params->x ?? default)).

Testing Instructions

  • Create a "Weblinks - Check links" scheduled task.
  • Remove http_timeout and batch_size from the task's params in #__scheduler_tasks (or create the task without them).
  • Run the task.

Expected result

No warnings; the task checks 3 links per run with a timeout of 8 seconds.

Actual result

PHP warnings, all links are checked in one run without a timeout.

Documentation Changes Required

None

avatar Hackwar Hackwar - open - 27 Nov 2026

Add a Comment

Login with GitHub to post a comment