GavickPro / News-Show-Pro-GK5

Advanced Joomla! content module.
28 stars 37 forks source link

Undefined indexes #342

Closed thekrotek closed 8 years ago

thekrotek commented 8 years ago

Updated NSP GK5 recently and again hit the same issues with undefined indexes:

Notice: Undefined index: nsp_pre_text in /modules/mod_news_pro_gk5/tmpl/default.php on line 27

Notice: Undefined index: nsp_post_text in /modules/mod_news_pro_gk5/tmpl/default.php on line 165

This isn't the first time, when I see this message with pre_text and post_text values after update, because I never add any pre or post text.

Just add a check for this indexes once and for all. Easy to do.

dziudek commented 8 years ago

Hello,

Did you tried to resave the module settings?

thekrotek commented 8 years ago

Huh, indeed it worked after saving. Yet I prefer to code with checks by empty() function to avoid such issues. But that's for you to decide, of course.