Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Notice: html_select_date: month_names must be an array of 12

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
jezbon
Smarty n00b


Joined: 23 Apr 2012
Posts: 2
Location: Sydney, Australia

PostPosted: Wed Apr 25, 2012 5:50 am    Post subject: Notice: html_select_date: month_names must be an array of 12 Reply with quote

Hi Guys,

Not sure if anyone else has experienced this problem. I've upgraded from Smarty 3.0.8 to 3.1.8 and now html_select_date when used to produce a month drop-down select has the following message:

Notice: html_select_date: month_names must be an array of 12 strings in /[.trunk..]/includes/Smarty-3.1.8/libs/plugins/function.html_select_date.php on line 128

If I change back to 3.0.8, it's fine again. My use of html_select_date is as follows:

{html_select_date prefix='date-when-1-' field_order='DMY' month_names='%b' all_extra ='class ="small"' start_year='-0' end_year='+2'}

Despite the notice message, everything still appears to work and the source HTML produced is fine.

Have I just done something silly here or is there actually a problem somewhere? Smile

Thanks.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Apr 25, 2012 9:21 am    Post subject: Reply with quote

In the documenation for html_date "month_names" and "month_format" was confused. Correctly your code shlud be

Code:
{html_select_date prefix='date-when-1-' field_order='DMY' month_format='%b' all_extra ='class ="small"' start_year='-0' end_year='+2'}
Back to top
View user's profile Send private message
jezbon
Smarty n00b


Joined: 23 Apr 2012
Posts: 2
Location: Sydney, Australia

PostPosted: Wed Apr 25, 2012 11:55 am    Post subject: Reply with quote

U.Tews wrote:
In the documenation for html_date "month_names" and "month_format" was confused. Correctly your code shlud be

Code:
{html_select_date prefix='date-when-1-' field_order='DMY' month_format='%b' all_extra ='class ="small"' start_year='-0' end_year='+2'}


Ah, thanks U.Tews Smile shall change that.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP