Project

General

Profile

Actions

Bug(バグ) #3067

open

Member クラスの getImageFileName() が string ではなく File オブジェクトを返してしまう

Added by Yuya Watanabe over 12 years ago. Updated almost 5 years ago.

Status:
New(新規)
Priority:
Normal(通常)
Assignee:
-
Target version:
Start date:
2012-06-05
Due date:
% Done:

0%

Estimated time:
3.6 で発生するか:
Yes (はい)
3.8 で発生するか:
Unknown (未調査)

Description

概要

Member クラスの getImageFileName() が string ではなく File オブジェクトを返してしまう.

getImageFileName() というメソッド名から string が返ってくることが期待されるが, Member クラスでは File オブジェクトまたは false を返してしまう.これらのメソッドは string で値を返すべきであると思われる.

lib/model/doctrine/Member.class.php

 196   public function getImageFileName()
 197   {
 198     if ($this->getImage())
 199     {
 200       return $this->getImage()->getFile();
 201     }
 202 
 203     return false;
 204   }

lib/user/opAnonymousMember.class.php

 105   public function getImageFileName()
 106   {
 107     return false;
 108   } 

参考

その他の getImageFileName() の実装

lib/model/doctrine/Community.class.php

 13   public function getImageFileName()
 14   {
 15     if ($this->File)
 16     {
 17       return $this->File->name;
 18     }
 19 
 20     return '';
 21   }

lib/model/doctrine/OAuthConsumerInformation.class.php

 48   public function getImageFileName()
 49   {
 50     return (string)$this->getImage();
 51   }

Actions #1

Updated by Yuya Watanabe over 12 years ago

  • 3.6 で発生するか changed from Unknown (未調査) to Yes (はい)
Actions #2

Updated by kaoru n almost 8 years ago

  • Target version changed from OpenPNE 3.9.0-old to OpenPNE 3.9.0
Actions #3

Updated by isao sano over 7 years ago

現状、ソースコードが概要にある通りであることを確認しました。

Actions #4

Updated by kaoru n almost 5 years ago

  • Target version changed from OpenPNE 3.9.0 to OpenPNE 3.10.x
Actions

Also available in: Atom PDF