Hi,

I'm getting so frustrated with this.....

I have put some error trapping code in my site with the following code (an
included file):

<?php
        ob_start();
        error_reporting(E_ALL);
        set_error_handler('pc_error_handler');  
        function pc_error_handler($errno, $error, $file, $line, $context) { 
                $message = "[ERROR][$errno][$error][$file:$line]";
                error_log($message);            
                echo $message;
        }
        
?>

I have a page that hits the database to display the records. One of the
columns is 'startDate'. I format this for display like this:

<td valign="top"><?php echo
date('m/d/Y',strtotime($row_GetAds['startDate'])); ?></td>

The page returns the following error:

[ERROR][8][Undefined index:
startDate][/home/.paco/campuscb/campuscorkboard.com/search_jobs.php:319][ERR
OR][8][strtotime() called with empty time
parameter][/home/.paco/campuscb/campuscorkboard.com/search_jobs.php:319]10/1
0/2003

If I comment out the error_reporting include file, the page renders fine. I
have checked the DB and the startDate column has a valid date in it.

Ideas?
Thanks,
James

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to