replaced [] array notation with php 5.3 compatible array(), fixed wrong variable name, check whether functions setCreatedBy and setModifiedBy exist