Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Image/Image.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Image/Image.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Core/Image/Image.php Thu May 09 15:33:08 2019 +0100 @@ -128,8 +128,7 @@ $this->fileSize = filesize($destination); $this->source = $destination; - // @todo Use File utility when https://www.drupal.org/node/2050759 is in. - if ($this->chmod($destination)) { + if (\Drupal::service('file_system')->chmod($destination)) { return $return; } } @@ -208,15 +207,18 @@ * Integer value for the permissions. Consult PHP chmod() documentation for * more information. * - * @see drupal_chmod() - * - * @todo Remove when https://www.drupal.org/node/2050759 is in. - * * @return bool * TRUE for success, FALSE in the event of an error. + * + * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. + * Use \Drupal\Core\File\FileSystem::chmod(). + * + * @see \Drupal\Core\File\FileSystemInterface::chmod() + * @see https://www.drupal.org/node/2418133 */ protected function chmod($uri, $mode = NULL) { - return drupal_chmod($uri, $mode); + @trigger_error('chmod() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\File\FileSystemInterface::chmod(). See https://www.drupal.org/node/2418133.', E_USER_DEPRECATED); + return \Drupal::service('file_system')->chmod($uri, $mode); } }