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

log_error argument mismatch #4684

Closed
l2dy opened this issue Sep 8, 2020 · 2 comments
Closed

log_error argument mismatch #4684

l2dy opened this issue Sep 8, 2020 · 2 comments
Labels
bug:Low good-first-issue Good for newcomers/簡単に修正できそうなもの
Milestone

Comments

@l2dy
Copy link
Contributor

l2dy commented Sep 8, 2020

概要(Overview)

log_error expects 2 arguments.

function log_error($message, array $context = [])
{
$app = \Eccube\Application::getInstance();
if (isset($app['eccube.logger'])) {
$app['eccube.logger']->error($message, $context);
}
}

But the following calls pass 3 arguments to it.

log_error('お届け先削除失敗', [$e], 'admin');

log_error('会員削除失敗', [$e], 'admin');

期待する内容(Expect) or 要望 (Requirement)

Remove the extra argument.

再現手順(Procedure)

環境 (environment)

  • EC-CUBE: 4.0.4
  • PHP: 7.x.x
  • DB:
    • PostgreSQL x.x.x
    • MySQL x.x.x

関連情報 (Ref)

@okazy
Copy link
Contributor

okazy commented Sep 14, 2020

Thanks for your report!
It would certainly be a correct to remove the third argument.

@okazy okazy added the bug:Low label Sep 14, 2020
@okazy okazy added this to the 4.0.x milestone Sep 14, 2020
@okazy okazy added the good-first-issue Good for newcomers/簡単に修正できそうなもの label Sep 14, 2020
@okazy okazy closed this as completed in d2f10eb Oct 6, 2020
@okazy
Copy link
Contributor

okazy commented Oct 6, 2020

It is fixed in # 4715 and closed.

@okazy okazy modified the milestones: 4.0.x, 4.1 Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:Low good-first-issue Good for newcomers/簡単に修正できそうなもの
Projects
None yet
Development

No branches or pull requests

2 participants