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

Error 500 when acceptance is required without signature #8623

Closed
2 tasks done
diegogarciadev opened this issue Oct 27, 2020 · 1 comment
Closed
2 tasks done

Error 500 when acceptance is required without signature #8623

diegogarciadev opened this issue Oct 27, 2020 · 1 comment

Comments

@diegogarciadev
Copy link

diegogarciadev commented Oct 27, 2020

Please confirm you have done the following before posting your bug report:

Describe the bug
When checkout with acceptance required but signature not required you will get an 500 error.
ErrorException: Undefined variable: sig_filename in /var/www/html/snipe-it/app/Http/Controllers/Account/AcceptanceController.php:109

To Reproduce
Steps to reproduce the behavior:

Expected behavior

Screenshots

    if ($request->input('asset_acceptance') == 'accepted') {

        $acceptance->accept($sig_filename);   <---------- $sig_filename will not exist if signature is disabled

        event(new CheckoutAccepted($acceptance));

        $return_msg = trans('admin/users/message.accepted');

    } else {

        $acceptance->decline($sig_filename);

Server (please complete the following information):

  • Snipe-IT Version
  • OS: [e.g. Ubuntu, CentOS]
  • Web Server: [e.g. Apache, IIS]
  • PHP Version

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Error Messages
[2020-10-27 13:33:40] production.ERROR: ErrorException: Undefined variable: sig_filename in /var/www/html/snipe-it/app/Http/Controllers/Account/AcceptanceController.php:109
Stack trace:
#0 /var/www/html/snipe-it/app/Http/Controllers/Account/AcceptanceController.php(109): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined varia...', '/var/www/html/s...', 109, Array)

Additional context

@diegogarciadev
Copy link
Author

solved in #8589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant