This avoids a "Cannot access offset of type string on string" fatal error in `set_theme_mod()` on PHP 8 if the `theme_mods_$theme_slug` option has an incorrect value, e.g. an empty string instead of an array. With this change, `set_theme_mod()` should be able to resolve the issue by saving a correct value. Follow-up to [15736], [15739], [30672], [32629], [32632]. Props xknown. See #51423. Built from https://develop.svn.wordpress.org/trunk@51524 git-svn-id: http://core.svn.wordpress.org/trunk@51135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
123 KiB
123 KiB