[Dates] erreur migration PHP4 a 5 sur $date=getdate
Bonjour,
Suite à la migration de php 4.4.8 à php 5.2.5
j'ai le Pb suivant:
Citation:
Warning: getdate() expects parameter 1 to be long, string given in /home.10.9/cpsifran/www/test/croacroa/members/update.php on line 6
et
Citation:
Warning: getdate() expects parameter 1 to be long, string given in /home.10.9/cpsifran/www/test/croacroa/index.php on line 111
a la ligne 6 de update.php et a la ligne 111 de index.php il y a
Code:
$date=getdate($c[finish]);
voici mon fichier update.php pour plus de compréhensions
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <?php
$db = mysql_connect($mysql_host,$mysql_user,$mysql_password) or die ("Erreur de connexion - subscribe");
mysql_select_db($mysql_base,$db) or die ("erreur de connexion base");
$req=mysql_query("SELECT * from members where id='$_SESSION[idu]'") or die("erreur selection members");
$c=mysql_fetch_array($req);
$date=getdate($c[finish]);
if($date[year] >= date("Y") && $date[mon] >= date("m") && $date[mday] >= date("J") && $date[hours] >= date("H") && $date[minutes] >= date("i") && $date[seconds] >= date("s"))
{
if($c[offre]=='lite' || $c[offre]=='pro')
{
$sql="UPDATE members Set version='$c[offre]', offre=''";
if($c[version]=='lite' || $c[offre]=='pro')
{$sql .= ", gbook='no', galley='no', forum='no'";}
mysql_query($sql) or die("erreur update abonnement");
}
}
mysql_close();
?> |
Merci d'avance pour l'aide