Project

General

Profile

Actions

Backport(バックポート) #3709

closed

opToolkit::writeCacheFile() にある複数の不具合の修正

Added by isao sano over 10 years ago. Updated about 10 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Assignee:
Target version:
Start date:
2013-01-17
Due date:
% Done:

100%

Estimated time:

Description

Overview (概要)

lib/util/opToolkit.class.php 内の opToolkit::writeCacheFile() に下記のようなコードがある。

if ($filesystem->copy($tmpFile, $pathToCacheFile, array('override' => true)))
{
  $filesystem->remove($tmpFile);
}

このコードには下記のような複数の問題があるため、この修正を行う。

  • if の条件に、値を返さない sfFilesystem::copy() を指定している
  • もし sfFilesystem::copy() が成功した場合に true を返すようなメソッドであることを期待していたとしても、$tmpFile のファイルは常に削除されるべきであるため if による分岐は不要である (失敗した場合でも一時ファイルは削除すべき)

Spec (仕様)

  • if による分岐を無くし、常に $filesystem->remove($tmpFile) が実行されるようにする

Related issues 1 (0 open1 closed)

Copied from OpenPNE 3 - Bug(バグ) #3302: opToolkit::writeCacheFile() にある複数の不具合の修正Won't fix(対応せず)Youichi Kimura2013-01-17

Actions
Actions #1

Updated by isao sano over 10 years ago

  • Copied from Bug(バグ) #3302: opToolkit::writeCacheFile() にある複数の不具合の修正 added
Actions #2

Updated by isao sano over 10 years ago

  • Status changed from Pending Review(レビュー待ち) to New(新規)
  • Assignee deleted (Youichi Kimura)
  • % Done changed from 50 to 0
Actions #3

Updated by isao sano over 10 years ago

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

Updated by isao sano over 10 years ago

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

https://github.com/openpne/OpenPNE3/pull/202
にてプルリクエストしました

Actions #5

Updated by isao sano about 10 years ago

  • Assignee set to isao sano
Actions #6

Updated by Shinichi Urabe about 10 years ago

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

Updated by Shinichi Urabe about 10 years ago

  • Status changed from Rejected(差し戻し) to Pending Testing(テスト待ち)
  • % Done changed from 50 to 70

ステータス間違えました
レビュー済みです

Actions #8

Updated by isao sano about 10 years ago

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

試験完了しました。
問題ありません。

Actions #9

Updated by Shinichi Urabe about 10 years ago

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

Also available in: Atom PDF