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

SC_FormParam をグローバルでインスタンス化すると E_WARNING が出力されるのを修正 #1111

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

nanasess
Copy link
Contributor

Fixes #1027
グローバルでインスタンス化した場合は class が含まれないため

グローバルでインスタンス化した場合は class が含まれないため
Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.94%. Comparing base (45ed754) to head (84330c5).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1111   +/-   ##
=======================================
  Coverage   49.94%   49.94%           
=======================================
  Files          82       82           
  Lines       10480    10480           
=======================================
  Hits         5234     5234           
  Misses       5246     5246           
Flag Coverage Δ
tests 49.94% <100.00%> (ø)

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.

@nanasess nanasess enabled auto-merge December 26, 2024 08:29
@nanasess nanasess added this to the 2.18(仮) milestone Dec 26, 2024
Copy link
Contributor

@seasoftjapan seasoftjapan left a comment

Choose a reason for hiding this comment

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

E_WARNING が2件減ることを確認した。

-2025/01/08 19:01:23 [/debug.php] Warning(E_WARNING): Undefined array key 1 on [/var/www/app/data/class/SC_FormParam.php(72)] from 192.168.144.1
-2025/01/08 19:01:23 [/debug.php] Warning(E_WARNING): Trying to access array offset on value of type null on [/var/www/app/data/class/SC_FormParam.php(72)] from 192.168.144.1

以下コードでクラス名と null を受け取れることを確認した。

        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance();
        $objPlugin->arrRegistedPluginActions['SC_FormParam_construct'][] = [['function' => function ($class, $objFormParam) {
            var_dump($class);
        }]];
/* 結果
string(13) "LC_Page_Debug"
NULL
*/

@nanasess nanasess merged commit 5ae14f6 into EC-CUBE:master Jan 8, 2025
108 checks passed
@nanasess nanasess deleted the fix-sc_formparam branch January 8, 2025 11:37
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.

SC_FormParam をグローバルでインスタンス化すると E_WARNING が出力される
2 participants