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

Unable to save "None" option for Certificate Template on PHP 8 #334

Closed
donnapep opened this issue May 18, 2023 · 2 comments · Fixed by #353
Closed

Unable to save "None" option for Certificate Template on PHP 8 #334

donnapep opened this issue May 18, 2023 · 2 comments · Fixed by #353

Comments

@donnapep
Copy link
Contributor

donnapep commented May 18, 2023

Originally reported in Automattic/sensei#6813.

When editing a course and set None in the Certificate Template field on a course and hit save, and then reload, the edit course page it reverts to the old value when the site runs on PHP v.8

The system works when editing a course that doesn't have a template selected, then select one, hit save and reload.

In other words, the saving option doesn't work when removing an excisting a certificate template on a course and the site is on PHP v.8. Confirmed it works on PHP 7.4

The user reported this on the forum: https://wordpress.org/support/topic/set-none-on-certificate-template-on-course-doesnt-work-on-php-8/#post-16645080

They also share a screencast.

Noting the following errors reported too:

PHP Warning: Attempt to read property “display_name” on bool in C:\Laragon\www\Webbkurshlr\wp-content\plugins\sensei-certificates\classes\class-woothemes-sensei-certificates.php on line 596
PHP Warning: Attempt to read property “user_login” on bool in C:\Laragon\www\Webbkurshlr\wp-content\plugins\sensei-certificates\classes\class-woothemes-sensei-certificates.php on line 596

Sensei LMS v. 4.13.0.1.13.0
WordPress v. 6.2

@donnapep donnapep changed the title Unable to save "None" option for Certificate Template on PHP v.8 Unable to save "None" option for Certificate Template on PHP 8 May 18, 2023
@donnapep
Copy link
Contributor Author

donnapep commented Jul 4, 2023

@merkushin
Copy link
Contributor

Interesting to notice that the plugin doesn't support PHP 8 in development :)
https://github.com/woocommerce/sensei-certificates/blob/trunk/composer.json#L5

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

Successfully merging a pull request may close this issue.

2 participants