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

General: move VaultPress class to own file & add PHP53 shortcircuit #16

Merged
merged 3 commits into from
Jun 12, 2019

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jun 12, 2019

Fixes #15

  • Moving the main VaultPress class to its own class allows us to move all PHP 5.3+ code out of the plugin's entry point, vaultpress.php
  • In that plugin's entry point, we now check the PHP version in use on the site, and pause the VaultPress plugin (i.e. stop loading it) if you are running an old version of PHP.

image

To test

  • Try activating the plugin on a site running PHP 5.2. It should be paused.
  • Try activating the plugin on a site running a more modern version of PHP; nothing should change.

@jeherve jeherve added this to the 2.0 milestone Jun 12, 2019
@jeherve jeherve self-assigned this Jun 12, 2019
@jeherve jeherve force-pushed the fix/php53-dep branch 2 times, most recently from 01b8af3 to 8423e40 Compare June 12, 2019 10:39
vaultpress.php Outdated Show resolved Hide resolved
vaultpress.php Outdated Show resolved Hide resolved
jeherve added 3 commits June 12, 2019 15:42
Fixes #15

- Moving the main VaultPress class to its own class allows us to move all PHP 5.3+ code out of the plugin's entry point, vaultpress.php
- In that plugin's entry point, we now check the PHP version in use on the site, and pause the VaultPress plugin (i.e. stop loading it) if you are running an old version of PHP.
Copy link
Member

@dereksmart dereksmart left a comment

Choose a reason for hiding this comment

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

Thank you for making those changes !

jeherve added a commit that referenced this pull request Jul 12, 2019
jeherve added a commit that referenced this pull request Jul 12, 2019
* General: move VaultPress class back to main plugin file

Partially reverts #16

* Logo: move to separate file.

This will avoid us using PHP5.3+ syntax in the plugin's entry file,
thus not fataling PHP 5.2 sites.
jeherve added a commit that referenced this pull request Jul 12, 2019
* General: move VaultPress class back to main plugin file

Partially reverts #16

* Logo: move to separate file.

This will avoid us using PHP5.3+ syntax in the plugin's entry file,
thus not fataling PHP 5.2 sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 5.2: Fatal Error
3 participants