No Code Attached Yet
avatar Rmh1978
Rmh1978
8 Nov 2024

Steps to reproduce the issue

Call a task where a external function has a warning/ deprecated message.

Expected result

Either Knockout or succes.

Actual result

Task freezes and is locked

System information (as much as possible)

Joomla 5.2

Additional comments

I have a external function in my component that is triggered in the task function. My external function calls another function that had these messages. That causes the Task to freeze and getting set to locked. My function is still executed correct but the Task is locked and i need to remove the lock in the db.

Warning
: Undefined array key "src" in
/libraries/xxx/src/Helper/Mail.php
on line
89

Deprecated
: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in
/libraries/xxx/src/Helper/Mail.php
on line
99

Deprecated
: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in
/libraries/xxx/src/Helper/Mail.php
on line
100

My fix was to set isset:
if (isset($image['src'])) {
$images[] = $image['src'];
}

But the task should not freeze when the external function still executes succesfully. I use try catch on triggering the function and Knockout on catch.

avatar Rmh1978 Rmh1978 - open - 8 Nov 2024
avatar joomla-cms-bot joomla-cms-bot - change - 8 Nov 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Nov 2024
avatar Rmh1978 Rmh1978 - change - 8 Nov 2024
Title
Task freezes/ locks if external functions has warning/ deprecated messages
[5.2] Task freezes/ locks if external functions has warning/ deprecated messages
avatar Rmh1978 Rmh1978 - edited - 8 Nov 2024

Add a Comment

Login with GitHub to post a comment