Jonathan Desrosiers fc0c7a01f2 Widgets: Fix an “Invalid value” warning when adding a new widget in the Customizer.
This fixes a regression introduced in [50996] where sites that have been opted-out of the block-based widget editor experienced an “Invalid value.” error when adding a new widget to a sidebar in the Customizer.

This was caused by the early return value was changed to `null` from `$value` when set to an empty `array`, resulting in the widget being evaluated as invalid elsewhere.

Props jamesros161, caseymilne, naoki0h, ixkaito, zieladam, noisysocks, hellofromTonya.
Fixes #53479.

git-svn-id: https://develop.svn.wordpress.org/trunk@51232 602fd350-edb4-49c9-b593-d223f7449a82
2021-06-25 00:07:15 +00:00
..