setlocale() error in script.. old module in new phpnuke..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
snek_one
Forum Newbie
Posts: 7
Joined: Wed May 21, 2003 9:07 am

setlocale() error in script.. old module in new phpnuke..

Post by snek_one »

I was wondering if anybody could help me with this.. I am trying to install an old module into a new version of phpnuke..

Code: Select all

setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead.
This is the line the error points to:

Code: Select all

setlocale ("LC_TIME", "$locale");
Now, has phpnuke changed that $locale does not exist anymore or something? I can't find anything wrong with the actual script, just that the variable seems not to exist..

Could anybody explain to me what exactly this is supposed to do??
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Try changing:

Code: Select all

setlocale ("LC_TIME", "$locale");
to

Code: Select all

setlocale(LC_TIME, $locale);
Mac
Post Reply