<?php if ($searchresult = $pages->find('general-terms-and-conditions')->toFile()): ?>
is throwing “Call to a member function toFile() on null”
<?php if ($searchresult = $pages->find('general-terms-and-conditions')->toFile()): ?>
is throwing “Call to a member function toFile() on null”
$page->find() should return a page object and you cannot call a field method (toFile()) on a page object. Additionally it seems the the page doesn’t exist, therefore the null pointer exception.
OK. Sorry, my mistake.