{"action":"closed","issue":{"url":"https://api.github.com/repos/rilwis/meta-box/issues/676","labels_url":"https://api.github.com/repos/rilwis/meta-box/issues/676/labels{/name}","comments_url":"https://api.github.com/repos/rilwis/meta-box/issues/676/comments","events_url":"https://api.github.com/repos/rilwis/meta-box/issues/676/events","html_url":"https://github.com/rilwis/meta-box/issues/676","id":112956183,"number":676,"title":"[Insight] Error silenced by the at sign (@) - in inc/fields/oembed.php, line 54","user":{"login":"rilwis","id":668274,"avatar_url":"https://avatars.githubusercontent.com/u/668274?v=3","gravatar_id":"","url":"https://api.github.com/users/rilwis","html_url":"https://github.com/rilwis","followers_url":"https://api.github.com/users/rilwis/followers","following_url":"https://api.github.com/users/rilwis/following{/other_user}","gists_url":"https://api.github.com/users/rilwis/gists{/gist_id}","starred_url":"https://api.github.com/users/rilwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rilwis/subscriptions","organizations_url":"https://api.github.com/users/rilwis/orgs","repos_url":"https://api.github.com/users/rilwis/repos","events_url":"https://api.github.com/users/rilwis/events{/privacy}","received_events_url":"https://api.github.com/users/rilwis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-23T05:40:00Z","updated_at":"2015-12-15T03:51:47Z","closed_at":"2015-12-15T03:51:47Z","body":"**[in inc/fields/oembed.php, line 54](https://github.com/rilwis/meta-box/blob/a5ed7c77435df5f8fc43f8371a86204fe05e8ca0/inc/fields/oembed.php#L54)**\r\n\r\n> Adding \"@\" before `wp_oembed_get($url)` prevents warning and errors during this function execution from being displayed.\r\nIf you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.\r\n\r\n```php\r\n\t\t * @return string\r\n\t\t */\r\n\t\tstatic function get_embed( $url )\r\n\t\t{\r\n\t\t\t// Try oembed first\r\n\t\t\t$embed = @wp_oembed_get( $url );\r\n\r\n\t\t\t// If no oembed provides found, try WordPress auto embed\r\n\t\t\tif ( ! $embed )\r\n\t\t\t{\r\n\t\t\t\t$embed = $GLOBALS['wp_embed']->shortcode( array(), $url );\r\n```\r\n\r\n---------------------\r\n\r\n_Posted from [SensioLabsInsight](https://insight.sensiolabs.com/projects/7a16817b-61a8-4714-a3f2-bddfe15563ca/analyses/232?status=violations)_"}}