Express Custom View Template Error

Permalink
Following the documentation here

http://documentation.concrete5.org/developers/express/using-the-exp...

I've managed to get a custom template up and running but I've run into an issue where the attribute is something other than a string.

The line <?=$expressobject->getExpressObjectAttribute()? returns the error “Object of class could not be converted to string”. Normal text string attributes are fine.

I've struggled through the core code and doctrine documentation for two days but I'm no further forward.

Any ideas please anyone?