Object of class Concrete\Core\Area\SubArea could not be converted to string

Permalink
I was in the process of creating a 'Recent Comments'section using the php add-on block from the market place. After making an update the entire page will not load and confronts me with the error specified in the title.

Have tried reverting to a previous version of the page but with no effect, what can I do to get my page back? Here is the last working version before I broke it.

<?php
$db = Loader::db();
$query = 'SELECT cnvMessageAuthorName AS Author, cnvMessageBody AS Message, cnvMessageDateCreated AS DateCreated FROM ConversationMessages ORDER BY cnvMessageDateCreated DESC LIMIT 3';
$result = $db->Execute($query);
while ($row = $result->FetchRow()) {
    echo $row['Author']." ";
    echo $row['Message']." ";
    echo $row['DateCreated'];
    echo '</br>';
}
?>


Not exactly sure what I have done to generate this error. Some kind of php error I presume. Any information would be helpful and apologies if this is really noobish, am new to C5. Thanks for reading.

 
concrete5userr replied on at Permalink Reply
Uninstalling the php block add-on has resolved the issue for me. Thank you to MrKDilkington (IRC) for the suggestion.