Skip to content
Snippets Groups Projects

Upgrade v12

Merged Stefan Galinski requested to merge upgrade_v12 into master
7 files
+ 23
30
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -134,15 +134,15 @@ class ResourceReplacerMiddleware implements MiddlewareInterface {
continue;
}
if (strpos($path['original'], 'data:') === 0) {
if (str_starts_with($path['original'], 'data:')) {
continue;
}
if (strpos($path['original'], '//') === 0) {
if (str_starts_with($path['original'], '//')) {
continue;
}
if (strpos($path['normalizedPath'], '.php') !== FALSE) {
if (str_contains($path['normalizedPath'], '.php')) {
continue;
}
@@ -152,11 +152,11 @@ class ResourceReplacerMiddleware implements MiddlewareInterface {
}
if (!$isSameDomain) {
if (strpos($path['original'], '/') === 0) {
if (str_starts_with($path['original'], '/')) {
$path['original'] = substr($path['original'], 1);
}
if (strpos($path['original'], '\'') === 0 || strpos($path['original'], '"') === 0) {
if (str_starts_with($path['original'], '\'') || str_starts_with($path['original'], '"')) {
$path['original'] = trim($path['original'], '\'"');
}
@@ -168,7 +168,7 @@ class ResourceReplacerMiddleware implements MiddlewareInterface {
}
}
if (strpos($path['original'], '/') === 0 || preg_match('~' . $domainPattern . '~', $path['original'])) {
if (str_starts_with($path['original'], '/') || preg_match('~' . $domainPattern . '~', $path['original'])) {
$pathWithStartingSlash = preg_quote($path['original'], '/');
$pathWithoutStartingSlash = preg_quote(substr($path['original'], 1), '/');
} else {
Loading