Fix mb_http_input ValueError version from 8.4.0 to 8.0.0 - #5252
Merged
lacatoire merged 1 commit intoAug 19, 2026
Merged
Conversation
lacatoire
force-pushed
the
fix/mb-http-input-valueerror-version
branch
from
June 23, 2026 14:11
77e9049 to
3cf6c41
Compare
This was referenced Aug 19, 2026
KentarouTakeda
added a commit
to php/doc-ja
that referenced
this pull request
Sep 22, 2026
* mb_strpos が返すのがバイト位置ではなく文字位置であることに追従 原文の php/doc-en@97f8edc (php/doc-en#5853) に追従する。 - 戻り値が、バイト位置ではなく 0 から数えた文字位置であることの明確化 - offset が文字単位であることの明記 - 文字オフセットとバイトオフセットが食い違う例の追加 - seealso への mb_strrpos と mb_stripos の追加 * mb_scrub の例を原文に追従 原文の php/doc-en@eb10503 (php/doc-en#5811) に追従する。 - bin2hex と var_dump でバイト列そのものを確認する例の追加 (端末やブラウザ、 フォントが独自の置換文字で表示するため、見た目だけでは判断できない) - 結果が mbstring.substitute_character に依存することを示す例 - 不正なバイト列を置き換えると u 修飾子つきの PCRE パターンがマッチするようになる例 - seealso の追加 * mb_decode_numericentity と mb_encode_numericentity の ValueError の条件とコード例に追従 原文の php/doc-en@3505aae (php/doc-en#4852) と php/doc-en@0bb8d1a (php/doc-en#4708) に追従する。 - ValueError がスローされる条件が「map が整数のリストでない場合」から 「map に int、float、bool、null、数値形式の文字列のいずれでもない値が 含まれている場合」に明確化されたこと - changelog 8.4.0 の条件が「map に暗黙のうちに int に変換できない値が 含まれている場合」に変わったこと - コード例の整形 (array( の記法、インデント、閉じ括弧の位置、末尾の ?>) * 不正なエンコーディングを渡した場合の説明を共有エンティティに追従 原文の php/doc-en@8465ca6 (php/doc-en#5418) に追従する。 - mb_strlen / mb_internal_encoding / mb_encoding_aliases の各ページが 独自に書いていた説明を、共有エンティティの参照に置き換え - mb_strlen に、不正なエンコーディングを渡すと PHP 8.0.0 以降は ValueError をスローすること (これより前は E_WARNING が発生し、 false を返していた) を追記 - ValueError のマークアップの誤りを classname から exceptionname に修正 * mb_http_input が ValueError をスローするようになったバージョンの誤りを原文に合わせて修正 原文の php/doc-en@2fab267 (php/doc-en#5252) に追従する。 - type が不正な場合に ValueError をスローするようになったのは 8.4.0 ではなく 8.0.0 であることの修正 * mb_encode_numericentity のコード例のコメントを翻訳 mb_decode_numericentity の同じコード例では訳されているコメントが、 mb_encode_numericentity では英語のまま残っていた。 あわせて、同じ内容のコメントが 2 ページで食い違わないよう、 mb_decode_numericentity 側の既訳も同一の文面に揃える。offsetN は 値に「追加」するのではなく加算するもので、そこも合わせて直す。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix incorrect version for ValueError in mb_http_input() changelog: was documented as 8.4.0, but the exception has been thrown since 8.0.0
Merged the two 8.0.0 changelog entries (ValueError + nullable type) into a single row
Fixes
mb_http_inputthrowsValueErrorin PHP 8.0.0, the change is incorrectly documented for 8.4.0 #5244