Skip to content

Commit

Permalink
BUGFIX getEmbedURL - don't strip GET vars (#27)
Browse files Browse the repository at this point in the history
* add if $src check
  • Loading branch information
jsirish committed Nov 14, 2023
1 parent 20bf1d7 commit dd0f674
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Elements/ElementOembed.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ class ElementOembed extends BaseElement
*/
private static $table_name = 'ElementOembed';

/**
* @return array
*/
private static $db = [

];

/**
* @var array
*/
Expand Down Expand Up @@ -118,9 +125,9 @@ public function getEmbedURL()

if ($iframe) {
// Extract the src attribute value
$src = $iframe->getAttribute('src');
$src = explode('?', $src);
return $src[0];
if ($src = $iframe->getAttribute('src')) {
return $src;
}
} else {
return null;
}
Expand Down

0 comments on commit dd0f674

Please sign in to comment.