-
Notifications
You must be signed in to change notification settings - Fork 101
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
PHP Warning 回避 #958
PHP Warning 回避 #958
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #958 +/- ##
==========================================
- Coverage 55.69% 55.69% -0.01%
==========================================
Files 75 75
Lines 8905 8906 +1
==========================================
Hits 4960 4960
- Misses 3945 3946 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -63,8 +63,7 @@ public function process() | |||
public function action() | |||
{ | |||
// 基本情報を渡す | |||
$objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData(); |
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.
変更前の以下コードだったら、$this->arrInfo
は null だったはずなので、いまさら $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
する必要も無いだろうという観点でしょうか?
$objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
$this->arrInfo = $objSiteInfo->data;
確かに無さそうですね。
$ fgrep -r arrInfo --include='recommend.tpl' | wc -l
0
消しましょうか?
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.
対応しました。5fbce349913be3cc270f7340dd06eeb0a3a10dae
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.
LGTM
PHP 8.1 で見かけた Warning を回避する。
root_parent_id
の配列要素追加の右辺値で Warning が発生していた。当該プロパティは2007年に追加されたが、2008年にはテンプレートから参照されなくなっているため、削除して良いと判断している。