Call a task where a external function has a warning/ deprecated message.
Either Knockout or succes.
Task freezes and is locked
Joomla 5.2
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.
Labels |
Added:
No Code Attached Yet
|
Title |
|