I have a function I call that works perfect on one page and returns the fatal error "Call to member function get_type() on a non object" on another page. I am calling this function within another and my class file is included just fine as other functions from that class work on this page. The switch statement is the same on the page that works and this one...
I have scoured help pages and manuals and cannot seem to solve my problem. Any suggestions would be appreciated. Thank you!
Code:
if (is_null($cust['date_viewed'])){
//get type
switch ($cust->get_type()){
case 'buy':
$cust_type = 'Buying';
break;
case 'sell':
$cust_type = 'Selling';
break;
case 'buy/sell':
$cust_type = 'Buying & Selling';
break;
default:
$cust_type = 'Unknown Type';
}
I have scoured help pages and manuals and cannot seem to solve my problem. Any suggestions would be appreciated. Thank you!