Bug(バグ) #3167
IsTrim の undefined Index notice
Status:
Invalid(無効)
Priority:
Low(低め)
Assignee:
-
Target version:
-
Start date:
2012-08-18
Due date:
% Done:
0%
3.6 で発生するか:
Yes (はい)
3.8 で発生するか:
Unknown (未調査)
Description
Notice を出さないようにした方が良い
Notice: Undefined index: IsTrim in .... /lib/util/opFormItemGenerator.class.php on line 171
Related issues
History
#1
Updated by Shin Ohno over 10 years ago
- Assignee deleted (
Shin Ohno)
diff --git a/lib/util/opFormItemGenerator.class.php b/lib/util/opFormItemGenerator.class.php index 2618c4b..223920d 100644 --- a/lib/util/opFormItemGenerator.class.php +++ b/lib/util/opFormItemGenerator.class.php @@ -168,7 +168,7 @@ class opFormItemGenerator public static function generateValidator($field, $choices = array()) { $field = self::arrayKeyCamelize($field); - $option = array('required' => $field['IsRequired'], 'trim' => $field['IsTrim']); + $option = array('required' => isset($filed['IsRequired']) ? $field['IsRequired'] : null, 'trim' => isset($field['IsTrim']) ? $field['IsTrim'] : null); if (!$choices && !empty($field['Choices'])) {
一行だけ変更してください。
#2
Updated by Yuma Sakata over 10 years ago
- Target version changed from OpenPNE 3.8.2 to OpenPNE 3.8.x
「対象バージョン」は本チケットの修正を含む予定のバーションを記載する欄で、リリース作業のために使用します。
いつ対応するか未定なので、「対象バージョン」を変更します。
#3
Updated by isao sano over 8 years ago
- Copied to Backport(バックポート) #3671: IsTrim の undefined Index notice added
#4
Updated by 誠二 天重 over 8 years ago
- Duplicates Bug(バグ) #3428: opFormItemGenerator::generateValidator() に渡すフィールドの IsRequired や IsTrim を省略すると E_NOTICE レベルのエラーが発生する added
#5
Updated by 誠二 天重 over 8 years ago
- 3.8 で発生するか set to Unknown (未調査)
https://redmine.openpne.jp/issues/3428
上記チケットと内容が重複しており、上記チケットがすでに進行中(3.8と3.6へのバックポートは完了)になりますので、こちらのチケットは閉じさせていただきます。
バグ報告ありがとうございました。
#6
Updated by 誠二 天重 over 8 years ago
- Status changed from New(新規) to Invalid(無効)
- Target version deleted (
OpenPNE 3.8.x)