Automattic / vip-go-mu-plugins

The development repo for mu-plugins used on the WordPress VIP Platform.
https://docs.wpvip.com/
GNU General Public License v2.0
197 stars 101 forks source link

VIP Parse.ly: Check for WP_INSTALLING in the vip-parsely plugin #6016

Open vaurdan opened 1 day ago

vaurdan commented 1 day ago

Description

This PR adds a new defensive check in the VIP Parse.ly plugin, that prevents the VIP-specific customizations of the WP Parse.ly plugin to load when WP_INSTALLING is set and true.

This fixes a fatal error being thrown when accessing the example.com/wp-activate.php URL. Since the vip-support plugin is not loaded when WP_INSTALLING is defined, this extra validation prevents the VIP customizations - that require this plugin - from loading.

PHP Fatal error:  Uncaught Error: Class "Automattic\VIP\Support_User\User" not found in /var/www/wp-content/mu-plugins/vip-parsely/vip-parsely.php:93
Stack trace:
#0 /var/www/wp-includes/class-wp-hook.php(312): {closure}(NULL, 'smart_linking', Object(WP_User))
#1 /var/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
(...)

Changelog Description

Fixed

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

Pre-deploy checklist

sonarcloud[bot] commented 1 day ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 30.53%. Comparing base (cb8e520) to head (ee50c79). Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
vip-parsely/vip-parsely.php 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #6016 +/- ## ============================================= + Coverage 30.51% 30.53% +0.01% Complexity 4811 4811 ============================================= Files 289 289 Lines 21173 21163 -10 ============================================= + Hits 6461 6462 +1 + Misses 14712 14701 -11 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.