How to fix «Unable to apply data patch Magento\Theme\Setup\Patch\Data\RegisterThemes for module Magento_Theme» in Magento ≥ 2.3.5 in Windows?

01

Replace the line:


with the following one:

if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {

github.com/magento/magento2/issues/28055#issuecomment-622533641