WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
195 stars 39 forks source link

Fix fatal error introduced in #449 #453

Closed swissspidy closed 2 months ago

swissspidy commented 2 months ago

Introduced in #449

Reported in https://github.com/swissspidy/wp-plugin-check-action/issues/68

To reproduce:

wp plugin check akismet --require=./wp-content/plugins/plugin-check/cli.php

cc @ernilambar

swissspidy commented 2 months ago

IDK, don't have a strong opinion. We can keep doing it in the constructor, but throwing an exception seems overkill.

ernilambar commented 2 months ago

What if we provide polyfill function for wp_normalize_path() so that it is always available.

swissspidy commented 2 months ago

I think a polyfill for an edge case that should never ever happen is overkill.

Here it‘s only not available because of the hacky object-cache.php drop-in