Project

General

Profile

Backport(バックポート) #3865

PickHomeLayoutForm クラスで返り値が void となるメソッドを返り値に指定している

Added by isao sano almost 4 years ago. Updated almost 4 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Target version:
Start date:
2015-11-09
Due date:
% Done:

100%


Description

概要

PickHomeLayoutForm クラスで返り値が void となるメソッドを返り値に指定している

下記 73 行目では $snsConfig (SnsConfig クラス)の save() の返り値を用いているが,これは opDoctrineRecord クラスの save() となり,これは return を使ってないので void となる.

apps/pc_backend/modules/design/lib/PickHomeLayoutForm.class.php
 56 
 57   public function save()
 58   {
...
 64     $snsConfig = Doctrine::getTable('SnsConfig')->retrieveByName($this->layoutName);
 65     if (!$snsConfig)
 66     {
 67       $snsConfig = new SnsConfig();
 68       $snsConfig->setName($this->layoutName);
 69     }
 70     $value = $this->choices[$this->values['layout']];
 71     $snsConfig->setValue($value);
 72 
 73     return (bool)$snsConfig->save();
 74   }

lib/util/opDoctrineRecord.class.php
 56   public function save(Doctrine_Connection $conn = null)
 57   {
 58     if (is_null($conn))
 59     {
 60       $conn = opDoctrineQuery::chooseConnection(true);
 61     }
 62 
 63     parent::save($conn);
 64   }

Related issues

Related to OpenPNE 3 - Bug(バグ) #3492: PickHomeLayoutForm クラスで返り値が void となるメソッドを返り値に指定している Won't fix(対応せず) 2013-11-20

Associated revisions

Revision f1c4d638 (diff)
Added by Chiharu Nakajima almost 4 years ago

(refs #3865, BP from #3492) repair the return value exactly

Revision fb4fcb13 (diff)
Added by Chiharu Nakajima almost 4 years ago

(refs #3865, BP from #3492) repair the return value exactly

Revision fefb9ebb
Added by Rimpei Ogawa almost 4 years ago

Merge pull request #290 from C-nakajima/t-3865

(refs #3865, BP from #3492) repair the return value exactly

History

#1 Updated by isao sano almost 4 years ago

  • Related to Bug(バグ) #3492: PickHomeLayoutForm クラスで返り値が void となるメソッドを返り値に指定している added

#2 Updated by isao sano almost 4 years ago

  • Status changed from New(新規) to Accepted(着手)

#3 Updated by isao sano almost 4 years ago

  • Status changed from Accepted(着手) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

https://github.com/openpne/OpenPNE3/pull/275
にてプルリクエストを行いました。

レビューお願いします。

#4 Updated by Rimpei Ogawa almost 4 years ago

  • Status changed from Pending Review(レビュー待ち) to Rejected(差し戻し)

#5 Updated by Chiharu Nakajima almost 4 years ago

  • Status changed from Rejected(差し戻し) to Pending Review(レビュー待ち)
  • Assignee changed from isao sano to Chiharu Nakajima

プルリクエストしました。
https://github.com/openpne/OpenPNE3/pull/290

#6 Updated by Rimpei Ogawa almost 4 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

#7 Updated by isao sano almost 4 years ago

  • Status changed from Pending Testing(テスト待ち) to Pending Merge(マージ待ち)
  • % Done changed from 70 to 80

単体試験完了しました。
問題ありません。
マージお願いします。

#8 Updated by Rimpei Ogawa almost 4 years ago

  • Status changed from Pending Merge(マージ待ち) to Fixed(完了)
  • % Done changed from 80 to 100

Also available in: Atom PDF