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

fix type errors for two different login scenarios #200

Merged
merged 5 commits into from
May 30, 2024

Conversation

briskt
Copy link
Contributor

@briskt briskt commented May 24, 2024

Fixed

  • Fixed exception thrown when a user's password is about to expire.
SimpleSAML\Error\Error: UNHANDLEDEXCEPTION

Backtrace:
1 www/_include.php:20 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: TypeError: str_replace(): Argument https://github.com/silinternational/ssp-base/pull/2 ($replace) must be of type array|string, float given
Backtrace:
7 lib/SimpleSAML/Locale/Translate.php:308 (str_replace)
6 lib/SimpleSAML/Locale/Translate.php:308 (SimpleSAML\Locale\Translate::t)
5 lib/SimpleSAML/XHTML/Template.php:914 (SimpleSAML\XHTML\Template::t)
4 modules/material/themes/material/expirychecker/about2expire.php:34 (require)
3 lib/SimpleSAML/XHTML/Template.php:560 (SimpleSAML\XHTML\Template::show)
2 modules/expirychecker/www/about2expire.php:63 (require)
1 lib/SimpleSAML/Module.php:266 (SimpleSAML\Module::process)
0 www/module.php:10 (N/A)
  • Fixed exception thrown when a user is low on printable codes
SimpleSAML\Error\Error: UNHANDLEDEXCEPTION

Backtrace:
1 www/_include.php:20 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: TypeError: str_replace(): Argument https://github.com/silinternational/ssp-base/pull/2 ($replace) must be of type array|string, int given
Backtrace:
7 lib/SimpleSAML/Locale/Translate.php:308 (str_replace)
6 lib/SimpleSAML/Locale/Translate.php:308 (SimpleSAML\Locale\Translate::t)
5 lib/SimpleSAML/XHTML/Template.php:914 (SimpleSAML\XHTML\Template::t)
4 modules/material/themes/material/mfa/low-on-backup-codes.php:32 (require)
3 lib/SimpleSAML/XHTML/Template.php:560 (SimpleSAML\XHTML\Template::show)
2 modules/mfa/www/low-on-backup-codes.php:35 (require)
1 lib/SimpleSAML/Module.php:266 (SimpleSAML\Module::process)
0 www/module.php:10 (N/A)

briskt added 2 commits May 24, 2024 17:15
This error was shown in the browser:
```
SimpleSAML\Error\Error: UNHANDLEDEXCEPTION

Backtrace:
1 www/_include.php:20 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, float given
Backtrace:
7 lib/SimpleSAML/Locale/Translate.php:308 (str_replace)
6 lib/SimpleSAML/Locale/Translate.php:308 (SimpleSAML\Locale\Translate::t)
5 lib/SimpleSAML/XHTML/Template.php:914 (SimpleSAML\XHTML\Template::t)
4 modules/material/themes/material/expirychecker/about2expire.php:34 (require)
3 lib/SimpleSAML/XHTML/Template.php:560 (SimpleSAML\XHTML\Template::show)
2 modules/expirychecker/www/about2expire.php:63 (require)
1 lib/SimpleSAML/Module.php:266 (SimpleSAML\Module::process)
0 www/module.php:10 (N/A)
```
This error was shown in the browser:
```
SimpleSAML\Error\Error: UNHANDLEDEXCEPTION

Backtrace:
1 www/_include.php:20 (SimpleSAML_exception_handler)
0 [builtin] (N/A)
Caused by: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, int given
Backtrace:
7 lib/SimpleSAML/Locale/Translate.php:308 (str_replace)
6 lib/SimpleSAML/Locale/Translate.php:308 (SimpleSAML\Locale\Translate::t)
5 lib/SimpleSAML/XHTML/Template.php:914 (SimpleSAML\XHTML\Template::t)
4 modules/material/themes/material/mfa/low-on-backup-codes.php:32 (require)
3 lib/SimpleSAML/XHTML/Template.php:560 (SimpleSAML\XHTML\Template::show)
2 modules/mfa/www/low-on-backup-codes.php:35 (require)
1 lib/SimpleSAML/Module.php:266 (SimpleSAML\Module::process)
0 www/module.php:10 (N/A)
```
@briskt briskt requested a review from a team May 24, 2024 09:18
Copy link
Contributor

@hobbitronics hobbitronics left a comment

Choose a reason for hiding this comment

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

Looks good to me

@briskt briskt merged commit 3386802 into develop May 30, 2024
3 checks passed
@briskt briskt deleted the feature/fix-type-errors branch May 30, 2024 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants