Well, I can guarantee that this error is not from my hack, but from your mistake, either in applying this hack, or in upgrading to 2.2.7 or some other thing you did.

Like you said, this hack is as simple as it gets. You can basically uninstall this hack, and do it again, or try this.
Find this bit of code (basically what you posted in your post at the end):
PHP Code:
// get formatted date/time
if ($bbuserinfo['lastvisit']) {
$bbuserinfo['lastvisitdate'] = vbdate($dateformat." ".$timeformat,$bbuserinfo['lastvisit']);
Add this right underneath:
See if that works. You may have forgotten to close a function somewhere.