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

Don't exit if ABSPATH is not defined #12943

Merged
merged 1 commit into from
Jul 3, 2019
Merged

Don't exit if ABSPATH is not defined #12943

merged 1 commit into from
Jul 3, 2019

Conversation

eliorivero
Copy link
Contributor

@eliorivero eliorivero commented Jul 3, 2019

Work in the opposite way: if it's defined, run the code. This avoid exiting when PHPCS is running.

Changes proposed in this Pull Request:

  • Put functions that only have to run in WP environment inside the condition

Testing instructions:

  • Make sure PHPCS is running again.
  • If you have PhpStorm setup with PHPCS, as soon as you apply this change, PHPCS will start working again.

Proposed changelog entry for your changes:

  • Not needed.

@eliorivero eliorivero requested a review from a team July 3, 2019 16:31
@eliorivero eliorivero self-assigned this Jul 3, 2019
@eliorivero eliorivero added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jul 3, 2019
@eliorivero eliorivero requested review from tyxla, brbrr and oskosk July 3, 2019 16:32
@eliorivero eliorivero force-pushed the fix/dont-exit-phpcs branch from af9db70 to 8669b6e Compare July 3, 2019 16:35
…'s defined, run the code. This avoid exiting when PHPCS is running.
@eliorivero eliorivero force-pushed the fix/dont-exit-phpcs branch from 8669b6e to 2e26564 Compare July 3, 2019 16:41
@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: August 6, 2019.
Scheduled code freeze: July 30, 2019

Generated by 🚫 dangerJS against 2e26564

Copy link
Contributor

@brbrr brbrr 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!

@brbrr brbrr merged commit f21ae07 into master Jul 3, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jul 3, 2019
@jeherve jeherve added this to the 7.6 milestone Jul 3, 2019
@jeherve jeherve modified the milestones: 7.6, 7.5.2 Jul 3, 2019
@jeherve jeherve deleted the fix/dont-exit-phpcs branch July 3, 2019 19:26
jeherve pushed a commit that referenced this pull request Jul 3, 2019
…'s defined, run the code. This avoid exiting when PHPCS is running. (#12943)
@jeherve
Copy link
Member

jeherve commented Jul 3, 2019

Cherry-picked to branch-7.5 in 2fe3afe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug When a feature is broken and / or not performing as intended [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants