mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-06 09:19:04 +00:00
Code Modernization: Change create_function() in phpunit/includes/plural-form-function.php to closure.
`create_function()` has been deprecated in PHP >= 7.2 and removed in PHP 8. The only instance left in core was used in a test that was being skipped on PHP >= 7.2. This allows the test to run again. Follow-up to [41722], [41730]. Props jrf. Fixes #50899. git-svn-id: https://develop.svn.wordpress.org/trunk@48790 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -74,10 +74,6 @@ class PluralFormsTest extends WP_UnitTestCase {
|
||||
* @group external-http
|
||||
*/
|
||||
public function test_regression( $lang, $nplurals, $expression ) {
|
||||
if ( version_compare( phpversion(), '7.2', '>=' ) ) {
|
||||
$this->markTestSkipped( 'Lambda functions are deprecated in PHP 7.2' );
|
||||
}
|
||||
|
||||
require_once dirname( dirname( __DIR__ ) ) . '/includes/plural-form-function.php';
|
||||
|
||||
$parenthesized = self::parenthesize_plural_expression( $expression );
|
||||
|
||||
Reference in New Issue
Block a user