Skip to content

Smarty 4.1.0 and PHP 8.1 still throwing "Undefined array key" warnings #749

Answered by wisskid
jgardynik asked this question in Q&A
Discussion options

You must be logged in to vote

The way I see it, you are already doing it fine. It's probably good practice to make sure you always provide a value for each variable the template uses. If you forget, you'll get a warning. Not a fatal error.

Mute the warnings if you don't want to see them in your production logs.
It can be useful to see the warnings during development, though.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wisskid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants