Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2024
Merged

PHP Warning 回避 #958

merged 2 commits into from
Jul 22, 2024

Conversation

seasoftjapan
Copy link
Contributor

@seasoftjapan seasoftjapan commented Jul 8, 2024

PHP 8.1 で見かけた Warning を回避する。

  • LC_Page_FrontParts_Bloc_Category はプロパティ root_parent_id の配列要素追加の右辺値で Warning が発生していた。当該プロパティは2007年に追加されたが、2008年にはテンプレートから参照されなくなっているため、削除して良いと判断している。

@seasoftjapan seasoftjapan enabled auto-merge July 8, 2024 14:13
@seasoftjapan seasoftjapan added this to the 2.17.3 milestone Jul 8, 2024
@seasoftjapan seasoftjapan self-assigned this Jul 8, 2024
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Project coverage is 55.69%. Comparing base (a12c9ff) to head (5fbce34).

Files Patch % Lines
data/class/helper/SC_Helper_Purchase.php 0.00% 16 Missing ⚠️
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     
Flag Coverage Δ
tests 55.69% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -63,8 +63,7 @@ public function process()
public function action()
{
// 基本情報を渡す
$objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このロジック自体未使用ですかね?

Copy link
Contributor Author

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

消しましょうか?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

はい、削除で問題なさそうです

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応しました。5fbce349913be3cc270f7340dd06eeb0a3a10dae

@EC-CUBE EC-CUBE deleted a comment from fine2102 Jul 22, 2024
Copy link
Contributor

@nanasess nanasess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seasoftjapan seasoftjapan merged commit 8d7a99c into master Jul 22, 2024
176 of 178 checks passed
@seasoftjapan seasoftjapan deleted the seasoft-php-warning branch December 19, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants