`json_decode()`: `JSON_INVALID_UTF8_*` flags should be mutually exclusive
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- php
調査の方向性
Start by reproducing the three json_decode() calls shown in the issue and tracing how JSON_INVALID_UTF8_IGNORE and JSON_INVALID_UTF8_SUBSTITUTE are validated. Done means the individual flags retain their current results while using both together raises the expected ValueError; add or update a regression test for the combined flags.
索引モデルが issue の本文から書いたものです。
説明
Description
The following code:
<?php
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_IGNORE ) );
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_SUBSTITUTE ) );
var_dump( json_decode( "\"a\xb0b\"", null, 512, JSON_INVALID_UTF8_IGNORE | JSON_INVALID_UTF8_SUBSTITUTE ) );
Resulted in this output:
string(2) "ab"
string(5) "a�b"
string(5) "a�b"
But I expected this output instead:
string(2) "ab"
string(5) "a�b"
<some kind of ValueError>
PHP Version
PHP 8.5.10, 3v4l
Operating System
No response
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 113
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
php/php-src のほかの issue
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
Bug Status: Needs Triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bug Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Bug Category: Tests Status: Verified
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Bug SAPI: fpm Status: Needs Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/k8s-device-plugin#2061 · コメント 1 件 ·
-
task
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vsanthanam/JBird#429 ·