diff --git a/core/includes/file.inc b/core/includes/file.inc
index e3ac8ea..64ca434 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -1546,13 +1546,13 @@ function drupal_chmod($uri, $mode = NULL) {
     // that the octal permission numbers can be expressed as integers or strings
     // and will be converted correctly in both cases.
     if (is_dir($uri)) {
-      $mode = octdec(config('system.file')->get('chmod.directory'));
+      $mode = octdec(Drupal::config('system.file')->get('chmod.directory'));
       if (!$mode) {
         $mode = 0775;
       }
     }
     else {
-      $mode = octdec(config('system.file')->get('chmod.file'));
+      $mode = octdec(Drupal::config('system.file')->get('chmod.file'));
       if (!$mode) {
         $mode = 0664;
       }
