accessing the method/properties of an anonymous object is not allowed in PHP 5.3.3. This was causing errors.