From 1531198741e170a5aff02c93ea302409b4b2e6e4 Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Thu, 1 Jun 2017 19:13:52 -0400 Subject: [PATCH] Issue #2850773 by alexpott: Fix tempnam() usage in PHP 7.1 --- modules/locale/locale.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 6fcf06fe5e6..db87e05548c 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -819,7 +819,7 @@ class LocalePluralFormatTest extends DrupalWebTestCase { * Additional options to pass to the translation import form. */ function importPoFile($contents, array $options = array()) { - $name = tempnam('temporary://', "po_") . '.po'; + $name = drupal_tempnam('temporary://', "po_") . '.po'; file_put_contents($name, $contents); $options['files[file]'] = $name; $this->drupalPost('admin/config/regional/translate/import', $options, t('Import')); @@ -1113,7 +1113,7 @@ class LocaleImportFunctionalTest extends DrupalWebTestCase { * Additional options to pass to the translation import form. */ function importPoFile($contents, array $options = array()) { - $name = tempnam('temporary://', "po_") . '.po'; + $name = drupal_tempnam('temporary://', "po_") . '.po'; file_put_contents($name, $contents); $options['files[file]'] = $name; $this->drupalPost('admin/config/regional/translate/import', $options, t('Import')); @@ -1340,7 +1340,7 @@ class LocaleExportFunctionalTest extends DrupalWebTestCase { function testExportTranslation() { // First import some known translations. // This will also automatically enable the 'fr' language. - $name = tempnam('temporary://', "po_") . '.po'; + $name = drupal_tempnam('temporary://', "po_") . '.po'; file_put_contents($name, $this->getPoFile()); $this->drupalPost('admin/config/regional/translate/import', array( 'langcode' => 'fr',