You mean if the array $criteria will not be a have key "project" is the error?