I have a really odd error:
[04-Jun-2010 15:55:32] PHP Catchable fatal error: Object of class Type could not be converted to string in /home/prettykl/public_html/2010/includes/functions.php on line 140
This is the code and line 140 is the $sql line.
if (!empty($type)) {
$sql = "SELECT * FROM `types` WHERE `type` = '$type'";
$dbi = new db();
$result = $dbi->query($sql);
$row = mysql_fetch_row($result);
$dbi->closeLink();
$where_array[] = "`typeID` = '".$row->typeID."'";
$where_array[] = "`typeID2` = '".$row->typeID."'";
}
I have 5 or 6 classes and I've never encountered this problem before. The function has no reference to the classes, any ideas??
Thanks,
Stefan