Cloning a site from the main site of a multisite gave me a duplicate key error and a half-built subsite. The cause was a blanket REPLACE on option names that collided with rows WordPress had already created, so I swapped it for an anchored, re-runnable rename. That fix let the code reach a serialized-object branch nobody had run in years, where a loop variable clobbered the column name, and then PHP 8 refused to write NUL-prefixed private properties. Three patches in twenty minutes. The takeaway: fixing an early crash turns everything behind it from unreachable into untested, so go looking for the next bug on purpose.
Read more "The duplicate key error with two more bugs behind it"
