akeeba/release-system

Warning: Undefined array key "category_id"

Closed this issue · 3 comments

hi, i discovered warning message on the release page in the ARS 7.0.8

Warning: Undefined array key "category_id" in /var/www/fastuser/data/www/xxxxx/components/com_ars/src/Service/Router.php on line 241

Joomla 4
tested on PHP 7.4 - 8.1
option "Use ItemID to build SEF URLs" is turned ON

my structure is:

  • [Categories – Entire repository]
    • [Releases]
      • [Updates – XML update file]
      • [Updates – XML update file]
      • [Updates – XML update file]
      • [Updates – XML update file]

Change line 240 to

$query['category_id'] = ($query['category_id'] ?? 0) ?: $this->getCategoryForRelease($query['release_id']);

The router has already been refactored for the upcoming version. I am adding these changes to the upcoming version as well.

fixed, thank you so much!

You're welcome!