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

countPlugins returning wrong number #26

Open
Rahe opened this issue Jan 22, 2021 · 0 comments
Open

countPlugins returning wrong number #26

Rahe opened this issue Jan 22, 2021 · 0 comments

Comments

@Rahe
Copy link

Rahe commented Jan 22, 2021

Description

Hello,

The method \Roots\Bedrock\Autoloader::countPlugins is returning a wrong number of mu-plugins if the mu-plugin isn't one.
Because the way of WordPress is counting mu-plugin is not the same as yours, the number can be wrong in the case of the folder on mu-plugins doesn't contains a php file with WordPress headers.

Steps to reproduce

  1. Add humanmade/mercator dependency
  2. Follow the installation process https://github.com/humanmade/Mercator#installation
  3. Load WordPres 2 times
  4. The updateCache method is called on every page

Expected behavior:
That only the real mu-plugins loaded by WordPress are effectively counted with get_plugins function.

Actual behavior:
The glob only counts the folders.

Reproduces how often:
100%

Versions

1.0.1, but the code haven't changed since.

Maybe strip away the mu-plugins without header to have the right count ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant