操作
Bug(バグ) #4431
完了pc_backend.php/member/invite にてサーバエラーが発生する
開始日:
2020-04-02
期日:
進捗率:
100%
予定工数:
(合計: 0:00時間)
3.6 で発生するか:
Unknown (未調査)
3.8 で発生するか:
No (いいえ)
説明
Overview (現象)¶
pc_backend.php/member/invite にアクセスすると以下のエラーが発生する。
Fatal error: Uncaught Error: Call to a member function pluralize() on null in (snip)/lib/form/doctrine/MemberConfigForm.class.php:106 Stack trace: #0 (snip)/lib/form/doctrine/MemberConfigForm.class.php(28): MemberConfigForm->setMemberConfigSettings() #1 (snip)/lib/form/MemberConfigForm/MemberConfigPcAddressForm.class.php(24): MemberConfigForm->__construct(NULL, Array, NULL) #2 (snip)/apps/pc_backend/modules/member/actions/actions.class.php(101): MemberConfigPcAddressForm->__construct(NULL, Array) #3 (snip)/lib/vendor/symfony/lib/action/sfActions.class.php(60): memberActions->executeInvite(Object(opWebRequest)) #4 (snip)/lib/vendor/symfony/lib/filter/sfExecutionFilter.class.php(92): sfActions->execute(Object(opWebRequest)) #5 (snip)/l in (snip)/lib/form/doctrine/MemberConfigForm.class.php on line 106
Causes (原因)¶
$termMyFriend = Doctrine::getTable('SnsTerm')->get('my_friend');
にて、sns_term.application = 'pc_backend' & sns_term.name = 'my_friend' のレコードが存在しないため。
Way to fix (修正内容)¶
https://github.com/nishizoe/OpenPNE3/blob/OpenPNE-3.8.10/lib/i18n/opI18N.class.php#L23-L30
$this->terms = Doctrine::getTable('SnsTerm');
$application = sfConfig::get('sf_app');
if ('pc_backend' == $application)
{
$application = 'pc_frontend';
}
$this->terms = Doctrine::getTable('SnsTerm');
$this->terms->configure($this->culture, $application);
と同様に、configure を行う
操作