Strona 1 z 1

Warning: setlocale();

: pt wrz 12, 2003 6:23 pm
autor: Hasior
Witam
Nie wiem co z tym fantem zrobic.
W PHP-Nuke po zamieszczeniu newsa na stronie glownej ukazal sie taki oto blad:

Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead. in /home2/domena/public_html/cms/mainfile.php on line 565.


W mainfile wyglada to tak (linia 565 pogrubiona):


function formatTimestamp($time) {
global $datetime, $locale;
setlocale ("LC_TIME", "$locale");
ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime);
$datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1]));
$datetime = ucfirst($datetime);
return($datetime);[/b]


Bede wdzieczny za pomoc

Hasior

Re: Warning: setlocale();

: wt mar 09, 2004 1:53 pm
autor: one_eddie
Tu jest wszystko napisane (Passing locale category name as string), wystarczylo otworzyc slownik ii po klopocie :]

Re: Warning: setlocale();

: wt mar 09, 2004 6:55 pm
autor: wixor
A atk bardziek konkretnie:
[php]<?php setlocale (LC_TIME,$locale); ?>[/php]
(czyli bez cudzysłowów)