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

FIX Add protection against deprecated warning from mb_check_encoding() #136

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

edwilde
Copy link
Contributor

@edwilde edwilde commented Oct 14, 2024

Description

When the $fieldValue is not set, the mb_check_encoding() function raises a deprecation warning.

[Deprecated] mb_check_encoding(): Calling mb_check_encoding() without argument is deprecated

So we make sure the field value is set before using it.

Manual testing steps

Use the restful server to output a field which is not set

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

@edwilde edwilde marked this pull request as ready for review October 14, 2024 22:58
Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please target 3.0 so that it can be patched released. You may need to rebase after doing that

@edwilde edwilde changed the base branch from 3 to 3.0 October 22, 2024 19:33
When the `$fieldValue` is not set, the `mb_check_encoding()` function raises a deprecation warning.

```
[Deprecated] mb_check_encoding(): Calling mb_check_encoding() without argument is deprecated
```

So we make sure the field value is set before using it.
@edwilde
Copy link
Contributor Author

edwilde commented Oct 22, 2024

All set 🚀

...also noticed that CI is not testing in PHP 8.3, that expected?

@edwilde edwilde requested a review from emteknetnz October 22, 2024 19:39
@emteknetnz
Copy link
Member

Hmm strange it's not testing in PHP 8.3 on pull-requests. It is testing 8.3 on the regular CI build, so on the very low chance there is an issue it'll be picked up within the next week or so.

@emteknetnz emteknetnz merged commit c169fad into silverstripe:3.0 Oct 23, 2024
8 checks passed
@emteknetnz
Copy link
Member

Linked PR has been merged, it will be automatically released shortly

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