Fixing small php errors