A search of a minor was proper where the minor was properly detained in violation of a curfew ordinance, and was searched prior to being placed in a curfew center with other minors. Welfare and Institutions Code sections 601 and 625, subdivision (a), permit an officer to take a minor into temporary custody for violating a local curfew ordinance. Section 626 also allows transportation to a curfew center or other facility where a minor can wait to be picked up by a parent or other adult, as well as temporary secure custody until that occurs. Since the minor was appropriately in temporary custody of police, a search incident to that detention was appropriate and authorized by existing case law. It was further reasonable to search the minor before putting him into a facility with other children.