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
This commit is contained in:
parent
5f0fb23a3b
commit
0bd3d78db1
|
@ -372,17 +372,6 @@ function mask_input_value( $in, $name = '_wpnonce' ) {
|
|||
return preg_replace( '@<input([^>]*) name="' . preg_quote( $name ) . '"([^>]*) value="[^>]*" />@', '<input$1 name="' . preg_quote( $name ) . '"$2 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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue