Skip to content

Commit dbe2229

Browse files
committed
handle exception on iframely=less parameter in URLs
1 parent 2e81a53 commit dbe2229

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/Embed/Gutenberg.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ public static function maybe_add_iframely_url_options($provider, $url, $args)
7777
$options_str = base64_decode(urldecode($params['iframely']));
7878
$options_query = json_decode($options_str);
7979

80-
foreach ($options_query as $key => $value) {
81-
$provider = add_query_arg($key, $value, $provider);
80+
# Some WPs have our legacy values &iframely=less in their posts
81+
if ($options_query) {
82+
foreach ($options_query as $key => $value) {
83+
$provider = add_query_arg($key, $value, $provider);
84+
}
8285
}
8386
}
8487
}

0 commit comments

Comments
 (0)