Details
Description
This method allows two separate WHERE clauses to be added to an SQL query, generating a fatal error. This happens when the method parameters are (false, N), as in this example:
$foo = CRM_Event_BAO_Event::getEvents(FALSE, 1);
The attached patch assumes that if $id is provided, $all is irrelevant, thus avoiding the error case. Patch also adds docblock comment for $id parameter.