Skip to content

Added array initialization to fix PHP 7.1 notices.#6958

Merged
dereksmart merged 1 commit intomasterfrom
fix/subscription-widget-71-compat
Apr 12, 2017
Merged

Added array initialization to fix PHP 7.1 notices.#6958
dereksmart merged 1 commit intomasterfrom
fix/subscription-widget-71-compat

Conversation

@zinigor
Copy link
Copy Markdown
Contributor

@zinigor zinigor commented Apr 10, 2017

Fixes #6101

Changes proposed in this Pull Request:

  • Adds array initialization to fix a notice in PHP 7.1.

Testing instructions:

  • Use a WordPress installation running on PHP 7.1.
  • Add some code that outputs a default subscriptions widget without any settings, like this:
add_action( 'wp_footer', function() {
	do_shortcode( '[jetpack_subscription_form]' );
} );
  • Observe the notice in the error log.
  • Update to this PR.
  • Observe no notice and verify that the shortcode works as it should.

Proposed changelog entry for your changes:

  • Fixed a notice in the subscription widget in PHP 7.1

@zinigor zinigor added [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings. [Status] Needs Review This PR is ready for review. Bug When a feature is broken and / or not performing as intended labels Apr 10, 2017
@zinigor zinigor requested review from jeherve and kraftbj April 10, 2017 14:35
Copy link
Copy Markdown
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.

This should work!

@jeherve jeherve 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 Apr 10, 2017
Copy link
Copy Markdown
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

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

WFM!

@dereksmart
Copy link
Copy Markdown
Contributor

😎

@dereksmart dereksmart merged commit 9544012 into master Apr 12, 2017
@dereksmart dereksmart deleted the fix/subscription-widget-71-compat branch April 12, 2017 15:40
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Apr 12, 2017
jeherve added a commit that referenced this pull request Apr 24, 2017
eliorivero pushed a commit that referenced this pull request Apr 25, 2017
* Changelog: initial commit for 4.9 release.

* Changelog: add #6929

* Changelog: move old changelogs to changelog.txt

* Readme: restore deleted release post link.

The post is now live.

* Changelog: add #6853

* Changelog: add #6856

* Changelog: add #6857

* Changelog: add #6884

* Changelog: add #6885

* Changelog: add #6892

* Changelog: add #6894

* Changelog: add #6898

* Changelog: add #6899

* Changelog: add #6900

* Changelog: add #6909

* Changelog: add #6927

* Changelog: add #6947

* Chagelog: add #6958

* Changelog: add #6961

* Changelog: add #6963

* Changelog: add #6965

* Changelog: add #6986

* Changelog: add #7000

* Changelog: add #7013

* Changelog: add #7015

* Changelog: add #7019

* Changelog: add #7028

* Changelog: add #6998

* Changelog: add #6999

* Changelog: add #7044

* Changelog: add #6881

* Changelog: add #6922

* Changelog: add #6940

* Changelog: add #6962

* Changelog: add #6942

* Changelog: add #6959

* Changelog: add #7018

* Changelog: add #6948

* Changelog: add #6657

* Changelog: add #7030

* Changelog: add #7048

* Changelog: add #7031

* Changelog: add #6990

* Changelog: add #6957

* Changelog: add #7027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug When a feature is broken and / or not performing as intended [Feature] Subscriptions All subscription-related things such as paid and unpaid, user management, and newsletter settings.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHP 7.1 Warning: show_subscribers_total

4 participants