Update BaseModel.php

Function getErrors added