-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
カスタムユニットがロード時にアンシリアライズされ、エラーが表示される問題 #15
Conversation
src/Models/Entry.php
Outdated
@@ -154,7 +154,7 @@ public function load($item) | |||
foreach ($this->units as & $unit) { | |||
$type = detectUnitTypeSpecifier($unit->getType()); | |||
if ($type === 'custom') { | |||
$unit->setField6(acmsUnserialize($unit->getField6())); | |||
$unit->setField6($unit->getField6()); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1000-x-t30
$unit の field6 の値を $unit の field6 で上書きしてるので、setField6
する前と後で何も変わってないということですかね?
となると、そもそも if ($type === 'custom') { ... }
まで不要なのでは?と思うのですがどうでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
columnテーブルにはフィールド情報もっていないので、翻訳するには専用の処理が必要だと思われます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$unit->getCustomUnitField() でフィールドが取得できるのかな。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atsu666 @1000-x-t30
$unit->getCustomUnitField()
が生えるのは 3.2 からなので、現状はカスタムユニットの翻訳は未対応ということでいいのかなと思ってます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atsu666 @uidev1116
ご指摘ありがとうございます。
現状はカスタムユニットの翻訳未対応で、アンシリアライズする必要がなく内容の変化がないので条件ごと削除しました。
ご確認お願いいたします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
承認します。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
お疲れ様です!
No description provided.