Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure that the ogv property exists before using it #6527

Merged
merged 2 commits into from
Mar 1, 2017

Conversation

dbtlr
Copy link
Contributor

@dbtlr dbtlr commented Feb 28, 2017

Fixes #6524

Note: stdClass sucks.

@dbtlr dbtlr added [Status] Needs Review This PR is ready for review. [Type] Quick Fix labels Feb 28, 2017
@dbtlr dbtlr requested a review from jeherve February 28, 2017 16:13
Copy link
Member

@zinigor zinigor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small nitpick, after that it's 🚢

if ( isset( $this->video->videos->ogv ) ) {
$ogg = $this->video->videos->ogv->url;
if ( ! empty( $ogg ) ) {
$html .= '<source src="' . esc_url($ogg) . '" type="video/ogg; codecs=&quot;' . esc_attr($this->video->videos->ogv->codecs) . '&quot;" />';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the nitpick, but you have removed spaces in braces here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHPStorm removed them when I tabbed the block in, not sure why.

@zinigor zinigor added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Feb 28, 2017
Copy link
Contributor

@briancolinger briancolinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After checking that $this->video->videos->ogv->url is set you could just pass that to esc_url() and remove the need to set a new variable and then unset it.

Just nitpicking, but the esc_url() and esc_attr() calls need to have spacing on either side of the input variable.

@dbtlr
Copy link
Contributor Author

dbtlr commented Mar 1, 2017

@briancolinger: I'm not going to debate code style here, but this file was previously written by an old Automattician and the purpose of this pull request is to fix a notice. As of now, beyond this fix, this code is stable. I'm not going to potentially introduce new notices in the code by hastily updating the style of all of the HTML blocks in this code.

If you would like to see this change happen, feel free to fix it in a new pull request. There are tons of places in the older VideoPress codebase that have style choices that look like this that can be fixed. :)

@dbtlr dbtlr removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Mar 1, 2017
@jeherve jeherve added the [Feature] VideoPress A feature to help you upload and insert videos on your site. label Mar 1, 2017
@zinigor
Copy link
Member

zinigor commented Mar 1, 2017

Thanks for fixing the whitespace! I agree, fixing all the other things can wait until the next PR.

@zinigor zinigor added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 1, 2017
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚢

@jeherve jeherve merged commit ffe005d into master Mar 1, 2017
@jeherve jeherve deleted the fix/videopress-player-notices branch March 1, 2017 14:52
@jeherve jeherve added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Mar 1, 2017
jeherve added a commit that referenced this pull request Mar 9, 2017
jeherve added a commit that referenced this pull request Mar 28, 2017
samhotchkiss pushed a commit that referenced this pull request Mar 29, 2017
* Readme: remove old release and add skeleton for 4.8.

* Changelog: add #6572

* Changelog: add #6567

* Changelog: add #6542

* Changelog: add #6527

* Changelog: add #6508

* Changelog: add #6478

* Changelog: add #6477

* Changelog: add #6249

* Update stable version and remove old version from readme.

* Changelog: add 4.7.1 to changelog.

* Readme: add new contributor.

* Sync: update docblock @SInCE version.

Related: #6053

* Changelog: add release post.

* changelog: add #6053

* Changelog: add #6413

* Changelog: add #6482

* Changelog: add #6584

* Changelog add #6603

* Changelog: add #6606

* Changelog: add #6611

* Changelog: add #6635

* Changelog: add #6639

* Changelog: add #6684

* Changelog: add #6710

* Changelog: add #6711

* Changelog: add #5461

* Testing list: update Settings UI feedback prompt.

Props @MichaelArestad

* Changelog: add #6789

* Changelog: add #6778

* Changelog: add #6777

* Changelog: add #6775

* Changelog: add #6755

* Changelog: add #6731

* Changelog: add #6721

* Changelog: add #6705

* Changelog: add #6702

* Changelog: add #6671

* Changelog: add #6637

* Changelog: add #6582

* Changelog: add #6566

* Changelog: add #6555

* Changelog: add #6529

* Changelog: add #6344

* Changelog: add #5763

* Changelog: add #5503

* Changelog: update #6637 changelog.

@see 40e115c#commitcomment-21523982

* Changelog: add #6699

* Changelog: add #6632

* Changelog: add #6769

* Changelog: add #6707

* Changelog: add #6590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] VideoPress A feature to help you upload and insert videos on your site.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants