The following class method inexplicably throws garbage into the HTTP headers producing the infamous "headers already produced by" warning:
/**
* Retrieve resultset as an array of objects set up by mysql_fetch_object() PHP function
*
* @access public
* @return object $result
*/
function getResult() { // OBJECT METHOD
$runquery = $this->runQuery();
$count = 0;
while ($row = mysql_fetch_object($runquery)) {
$result[$count] = $row;
$count++;
}
return $result;
}
I did some detective work and found the problem only occurs when you NOT comment either of these two lines:
$result[$count] = $row;
$count++;
How on earth could simple PHP computation cause this to occur? Using PHP 4.3.2
Phil