Page MenuHomePhabricator

"mb_check_encoding()" may rase a warning if passed an object which implements "__toString()"
Closed, ResolvedPublic

Description

See:

If mb_check_encoding() is passed an object which is not a string, but implements __toString(), it raises a warning in certain versions of PHP:

Screen Shot 2020-04-30 at 7.11.05 AM.png (1×1 px, 147 KB)

We can avoid this by using phutil_string_cast() before passing the parameter.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

epriestley created this task.
epriestley added a revision: Restricted Differential Revision.Apr 30 2020, 2:14 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Apr 30 2020, 2:19 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.