Those who stand for nothing, fall for anything.
Source, in full
The earliest known occurance of a similar adage dates back to 1926, then apparently regarded as a common one of unknown origin. Its connection to Alexander Hamilton arose from confusion with its use in 1978 by a UK radio broadcaster also named Alex Hamilton. Per QI.