#23093 closed enhancement (fixed)
Slight patch for load.php to avoid install warnings
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Installing where the php '@' (shut-up operator) is disabled, load.php throws a warning.
Attached is a patch for a fix.
Patch file instructions appear to suggest 'diff -up original change', so that's the patch format.
If another format is preferred, let me know and I'll resubmit the patch.
Attachments (2)
Change History (13)
While this fix is under review, describe the best way to set $blog_charset to avoid this warning.
Thanks.
Someone me know if there's something I can add to wp-config.php to resolve this warning.
Thanks.
I don't see in the PHP documentation (http://php.net/mb_internal_encoding) under what circumstances mb_internal_encoding() triggers a warning. I'm also not familiar when blog_charset is empty. If it were, that seems like it would break an awful number of charset declarations. In general, the existing function seems fairly confusing and I don't know the code's history.
Ok — looking at the PHP source, mb_internal_encoding() returns a warning for unknown encodings. So, the @ is still necessary. We just need to avoid the warning during install.
comment:7
SergeyBiryukov — 4 months ago
Related: #6092
23093.diff essentially reverts [7157].
Yes. This is correct. The warning only shows up when the shut-up operator is turned off,
which is essential for maintaining an error/warning free runtime environment.
Leaving the shut-up operator on masks all sorts of ugly errors that cause Wordpress
to whitescreen.
We still need to suppress a warning for when blog_charset — however improbable that may be — is an invalid encoding. See 23093.2.diff.
comment:10
nacin — 4 months ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 23373:
comment:11
dfavor — 4 weeks ago
Excellent...
This will also allow wp-cli to do error free Wordpress installs on the command line.
Thanks Niacin!

Patch wp-includes/load.php to avoid warning during install when php '@' shut-up is disabled