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

Bug Fix: Resolve Callback Issue in Email Parsing #1909

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from

Conversation

GabrielBragaGit
Copy link

@GabrielBragaGit GabrielBragaGit commented Dec 29, 2024

Description

Fixed an issue with array_walk callback by using the class method as a callback.

Details

  • Modified the code to use [$this, 'tln_casenormalize'] instead of a global function call
  • Ensures the case normalization method is correctly called within the class context
  • Prevents undefined function errors during email parsing

Code Change

// Before
@array_walk($tag_list, 'tln_casenormalize');

@array_walk($rm_tags_with_content, 'tln_casenormalize');

@array_walk($self_closing_tags, 'tln_casenormalize');

// After
@array_walk($tag_list, [$this, 'tln_casenormalize']);

@array_walk($rm_tags_with_content, [$this, 'tln_casenormalize']);

@array_walk($self_closing_tags, [$this, 'tln_casenormalize']);

#### Description
Fixed an issue with array_walk callback by using the class method as a callback.

#### Details
- Modified the code to use `[$this, 'tln_casenormalize']` instead of a global function call
- Ensures the case normalization method is correctly called within the class context
- Prevents undefined function errors during email parsing

#### Code Change
```php
// Before
@array_walk($tag_list, 'tln_casenormalize');

@array_walk($rm_tags_with_content, 'tln_casenormalize');

@array_walk($self_closing_tags, 'tln_casenormalize');

// After
@array_walk($tag_list, [$this, 'tln_casenormalize']);

@array_walk($rm_tags_with_content, [$this, 'tln_casenormalize']);

@array_walk($self_closing_tags, [$this, 'tln_casenormalize']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants