Skip to content

filter を原文の変更に追従 (5ファイル) - #629

Open
KentarouTakeda wants to merge 1 commit into
php:masterfrom
KentarouTakeda:sync-filter-errors
Open

KentarouTakeda wants to merge 1 commit into
php:masterfrom
KentarouTakeda:sync-filter-errors

Conversation

@KentarouTakeda

Copy link
Copy Markdown
Collaborator

filter の 5 ファイルを原文の変更に追従しました。これで filter モジュールの未訳・要更新はなくなります。

原文では次の変更がありました。

  • filter_var()・filter_input()・filter_has_var()・filter_var_array()・filter_input_array() に「エラー / 例外」の節が追加され、スローする例外が書かれました。対象は、INPUT_* 定数以外の値や options の不正なキーに対する ValueError・TypeError と、PHP 8.5.0 の FILTER_THROW_ON_FAILURE フラグによる Filter\FilterFailedException です。あわせて、PHP 8.0.0 で例外をスローするようになったことが changelog に追記されました(php/doc-en@d5e14b9、filter: document the exceptions of filter_var(), filter_input(), filter_has_var(), and the array variants doc-en#6090)
  • filter_var() に、検証結果の正しい確かめ方の例が 2 つ追加されました。0 のように false とみなされる値を false との厳密な比較で判定する例と、FILTER_NULL_ON_FAILURE を使った boolean の検証で null かどうかを判定する例です(php/doc-en@83dd631、Add examples for checking filter_var() results doc-en#6011)

対象ファイル

reference/filter/ (5) — functions/filter-has-var.xml, functions/filter-input-array.xml, functions/filter-input.xml, functions/filter-var-array.xml, functions/filter-var.xml

This branch has not been deployed

No deployments
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.

1 participant