-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
tplimpl: isset should return an error on unsupported type #3092
Comments
Related: #3089 Thanks for fixing this! |
Confirmed the fix.. now if I do
|
Reopened -- as this breaks lots of themes and the theme site. Will have to be re-evaluated. |
Unsupported types are currently silently ignored by IsSet. An earlier attempt was made to solve the issue by returning an error. That attempt was reverted since it broke some existing themes. So instead, we'll log an error. Hopefully, people will stop using IsSet in this way, and we can eventually return an error outright. Updates gohugoio#3092
Unsupported types are currently silently ignored by IsSet. An earlier attempt was made to solve the issue by returning an error. That attempt was reverted since it broke some existing themes. So instead, we'll log an error. Hopefully, people will stop using IsSet in this way, and we can eventually return an error outright. Updates #3092
Looks like this affects the "Casper" theme. |
In "hugo-coder" theme, when I start to building site, in the command line there is this warning: WARNING: calling IsSet with unsupported type "invalid" () will always return false. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
switch
should have a default case that returns an error when an unsupportedreflect.Kind
is encountered.See https://discuss.gohugo.io/t/help-understanding-isset/5577/2
The text was updated successfully, but these errors were encountered: