getting funny error on working page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've upgraded my PHP install and now I get this error in my test environment so I'm scared to load any changes up to the production website where this error doesn't exist. What is funny is the page still runs and lists all the data in correct rows, but with an error for each row right at the top of the page.
 
Notice: A non well formed numeric value encountered in C:\Inetpub\wwwroot\mazamaslocal\functions.php on line 15
 Oct 02 (Tue) Triple Crown Ken Searl
 
Here is the function
*************************************

function fMakeWideDate($thisdate,$senderformat)
 {
 //parameters:
 //1 for mm/dd/yyyy date format sent in
 //2 for yyyy/mm/dd date format sent in
 //this: fWideDate('12/04/2005',1)     returns: Dec 04, 2005 (Sun)
 //this: fWideDAte('2005-12-04',2)     returns: Dec 04, 2005 (Sun)
  if($senderformat==1)  //mmddyyyy
   {
   $month=substr($thisdate,0,2);
   $day =substr($thisdate,3,2);
   $year = substr($thisdate,6,4);
   $d =date("M d (D)",Mktime(0,0,0,$month,$day,$year));     <<<<<<< line 15 errors here (Oct 02 (Tue) )
    
   //echo $d;
   //$d =date("M d, Y (D)",Mktime(0,0,0,$month,$day,$year));
   }
  elseif($senderformat==2)  //yyyymmdd with dashes
   {
   $year = substr($thisdate,0,4);
   $month=substr($thisdate,5,2);
   $day =substr($thisdate,8,2);
    $d =date("M d (D)",Mktime(0,0,0,$month,$day,$year));
   }
  return $d;
 }
 
**********************************************
Here is what calls the function basically displaying a userfriendly date
 ////////////////////////////////////////////////////////////////////////////
 //LAY OUT THE ROWS WITH INFO HERE
 ///////////////////////////////////////////////////////////////////////////
   $fields=mysql_num_fields($data);
   {
    for($i=1 ; $i<=$fields-16; $i++)
    {
      if($i==3) //DISPLAY DATE
       {
        $WideDate=fMakeWideDate($row[$i],1);
        echo "<td class=\"fatcell\" >".$WideDate."</td>";    
       }

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux