From 0bd3d78db1e54e9ba221322ec8fe8feec6f692ff Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 20 Sep 2019 22:43:50 +0000 Subject: [PATCH] Tests: Remove a workaround for `str_getcsv()`. The `str_getcsv()` function was introduced in PHP 5.3.0, so no longer needs a polyfill. Props jrf. Fixes #48074. git-svn-id: https://develop.svn.wordpress.org/trunk@46222 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/utils.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php index 4f67185ea3..6d45117368 100644 --- a/tests/phpunit/includes/utils.php +++ b/tests/phpunit/includes/utils.php @@ -372,17 +372,6 @@ function mask_input_value( $in, $name = '_wpnonce' ) { return preg_replace( '@]*) name="' . preg_quote( $name ) . '"([^>]*) value="[^>]*" />@', '', $in ); } -if ( ! function_exists( 'str_getcsv' ) ) { - function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = '\\' ) { - $fp = fopen( 'php://temp/', 'r+' ); - fputs( $fp, $input ); - rewind( $fp ); - $data = fgetcsv( $fp, strlen( $input ), $delimiter, $enclosure ); - fclose( $fp ); - return $data; - } -} - /** * Removes the post type and its taxonomy associations. */