04-25-2012, 09:34 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: May 2009
Posts: 178
Thanks: 9
|
Catchable fatal error: Object of class Property could not be converted to string
Help! I am getting the following error:
Quote:
|
Catchable fatal error: Object of class Property could not be converted to string
|
Related to the code below:
PHP Code:
public function __construct(Property $property_obj) {
$this->db = ApplicationRegistry::dataLayer();
$this->$property_obj = $property_obj;
}
This same standard code has worked fine across my application previously however is now throwing me the error above that i cant get my head round. I am taking in an object and assigning it to a variable in the accepting class. I dont want to convert to a string. Why is PHP trying to do this? Would this error happen if the obejct being passed in was null or had not been properly instantiated?
Thanks.
|
|
|
|