Skip to content

Commit

Permalink
Merge pull request #1111 from nanasess/fix-sc_formparam
Browse files Browse the repository at this point in the history
SC_FormParam をグローバルでインスタンス化すると E_WARNING が出力されるのを修正
  • Loading branch information
nanasess authored Jan 8, 2025
2 parents 45ed754 + 84330c5 commit 5ae14f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/class/SC_FormParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function __construct()
// TODO: debug_backtrace以外にいい方法があれば良いが、一旦これで
$backtraces = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 2);
// 呼び出し元のクラスを取得
$class = $backtraces[1]['class'];
$class = isset($backtraces[1]['class']) ? $backtraces[1]['class'] : null;
$objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance();
if (is_object($objPlugin)) {
$objPlugin->doAction('SC_FormParam_construct', [$class, $this]);
Expand Down

0 comments on commit 5ae14f6

Please sign in to comment.