Most of the criminal laws people know about are laws that are promulgated by state legislatures or Congress. However, cities and counties can also enact laws that make certain conduct illegal. But not all of these city or county laws allow the police to arrest someone for a violation. Apparently, not all police officers know that. In a case south of Jacksonville, Florida, the suspect was sitting on a park bench late at night. Apparently, the county had an ordinance making it a violation for a person to engage in any activity in contradiction to a posted sign. The park had a sign saying the park was closed after dark. So, the police officers arrested the suspect for being in the park after dark and searched his backpack. They found a small amount of fentanyl in his backpack, and he was later charged with possession of a controlled substance.
Normally, when the police make a valid arrest, they are permitted to search the person and his immediate belongings. This is a search incident to an arrest, and the idea is that police are permitted to search a person and what he is carrying after an arrest because the police need to know if someone they are taking into custody has anything dangerous or illegal on him. This is a standard search that is difficult to challenge unless police use it as an excuse to search things away from and not connected to the suspect.
However, the problem here was the arrest itself. There was a county ordinance and the suspect was in violation of it by being in the park after dark, but the ordinance only allowed for a fine for a violation. Nothing in the ordinance allowed the police to arrest someone for any more than holding them while they wrote the ticket. As a result, the arrest for a county ordinance that did not authorize arrests was illegal. Since the arrest was illegal, the search of the backpack incident to the arrest was also illegal. Searches incident to a lawful arrest are fine, if limited in scope, but searches incident to an arrest are illegal if the arrest itself was not legal.