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

Training module: Use validator for more inputs #1110

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

blackcoder87
Copy link
Member

@blackcoder87 blackcoder87 commented Nov 17, 2024

Description

  • Use validator for more inputs.
  • Fix redirect on negative validation result.
  • Fix has-error class being applied to all inputs.
  • Require at least the address of the voice or gameserver if enabled.
PHP Fatal error:  Uncaught TypeError: Modules\Training\Models\Training::setShow(): Argument #1 ($show) must be of type bool, null given, called in application/modules/training/controllers/admin/Index.php on line 109 and defined in application/modules/training/models/Training.php:491
Stack trace:
#0 application/modules/training/controllers/admin/Index.php(109): Modules\Training\Models\Training->setShow()
#1 application/libraries/Ilch/Page.php(243): Modules\Training\Controllers\Admin\Index->treatAction()
#2 application/libraries/Ilch/Page.php(137): Ilch\Page->loadController()
#3 index.php(68): Ilch\Page->loadPage()
#4 {main}
  thrown in application/modules/training/models/Training.php on line 491

PHP Fatal error:  Uncaught TypeError: Modules\Training\Models\Training::setContact(): Argument #1 ($contact) must be of type int, string given, called in application/modules/training/controllers/admin/Index.php on line 101 and defined in application/modules/training/models/Training.php:307
Stack trace:
#0 application/modules/training/controllers/admin/Index.php(101): Modules\Training\Models\Training->setContact()
#1 application/libraries/Ilch/Page.php(243): Modules\Training\Controllers\Admin\Index->treatAction()
#2 application/libraries/Ilch/Page.php(137): Ilch\Page->loadController()
#3 index.php(68): Ilch\Page->loadPage()
#4 {main}
  thrown in application/modules/training/models/Training.php on line 307

Type of change

  • Bug fix (non-breaking change which fixes an issue)

This PR has been tested in the following browsers:

  • Chrome
  • Firefox
  • Opera
  • Edge

Fix redirect on negative validation result.
Fix has-error class being applied to all inputs.
@blackcoder87 blackcoder87 merged commit f8a5d7b into master Nov 17, 2024
6 checks passed
@blackcoder87 blackcoder87 deleted the training-module-fix-validation branch November 17, 2024 09:00
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

Successfully merging this pull request may close these issues.

1 participant