Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Task freezes/ locks if external functions has warning/ deprecated messages #44430

Open
Rmh1978 opened this issue Nov 8, 2024 · 0 comments

Comments

@Rmh1978
Copy link

Rmh1978 commented Nov 8, 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.

@Rmh1978 Rmh1978 changed the title Task freezes/ locks if external functions has warning/ deprecated messages [5.2] Task freezes/ locks if external functions has warning/ deprecated messages Nov 8, 2024
@Hackwar Hackwar added the bug label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants