Remove usage of PHP 8+ function from bootstrapper (#43308)
(PHP 7.4 compat) string lib polyfills are unavailable during bootstrapping.
This commit is contained in:
parent
6ef04bafa5
commit
f8b906000f
|
@ -0,0 +1,5 @@
|
|||
Significance: patch
|
||||
Type: dev
|
||||
Comment: This fixes an edge case when trying to run the php unit test suite in certain environments
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class WC_Unit_Tests_Bootstrap {
|
|||
$helpers_directory = $tests_directory . '/php/helpers';
|
||||
|
||||
// Support loading top-level classes from the `php/helpers` directory.
|
||||
if ( ! str_contains( $class, '\\' ) ) {
|
||||
if ( false === strpos( $class, '\\' ) ) {
|
||||
$helper_path = realpath( "$helpers_directory/$class.php" );
|
||||
|
||||
if ( dirname( $helper_path ) === $helpers_directory && file_exists( $helper_path ) ) {
|
||||
|
|
Loading…
Reference in New Issue