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

Craft 4 500 error #18

Closed
robzor opened this issue May 24, 2022 · 3 comments
Closed

Craft 4 500 error #18

robzor opened this issue May 24, 2022 · 3 comments

Comments

@robzor
Copy link

robzor commented May 24, 2022

Hi there,

I've just installed your plugin but when I choose it as a field type I get a 500 error in the console and this error in the logs:

2022-05-24 16:22:29 [web.ERROR] [Error] Error: Typed property rynpsc\phonenumber\fields\PhoneNumberField::$defaultRegion must not be accessed before initialization in /vendor/craftcms/cms/src/helpers/Template.php:90

Craft CMS 4.0.3
Phone Number 2.0.0.1

@robzor
Copy link
Author

robzor commented May 24, 2022

I am not sure, but I think this fixes the issue:

line 30 of vendor/rynpsc/craft-phone-number/src/fields/PhoneNumberField.php:

public ?string $defaultRegion = null;

@rynpsc
Copy link
Owner

rynpsc commented May 24, 2022

Thanks for reporting that. 2.0.1 is now out with a fix.

@rynpsc rynpsc closed this as completed May 24, 2022
@robzor
Copy link
Author

robzor commented May 24, 2022

No problem, thanks for fixing it so quickly :)

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

2 participants