From 7bd2274ba4f7e4eff006b0c5ac661128b88ac89f Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Thu, 1 Nov 2012 23:41:10 -0700 Subject: [PATCH] Issue #1811372 by sdboyer: Fixed FileStorage should utilize late static binding for inheritance friendliness. --- core/lib/Drupal/Core/Config/FileStorage.php | 4 ++-- core/lib/Drupal/Core/Config/InstallStorage.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Config/FileStorage.php b/core/lib/Drupal/Core/Config/FileStorage.php index 78a1af6753b7..1e22fdc4116e 100644 --- a/core/lib/Drupal/Core/Config/FileStorage.php +++ b/core/lib/Drupal/Core/Config/FileStorage.php @@ -53,7 +53,7 @@ public function __construct($directory) { * The path to the configuration file. */ public function getFilePath($name) { - return $this->directory . '/' . $name . '.' . self::getFileExtension(); + return $this->directory . '/' . $name . '.' . static::getFileExtension(); } /** @@ -189,7 +189,7 @@ public function listAll($prefix = '') { if (!file_exists($this->directory)) { throw new StorageException($this->directory . '/ not found.'); } - $extension = '.' . self::getFileExtension(); + $extension = '.' . static::getFileExtension(); $files = glob($this->directory . '/' . $prefix . '*' . $extension); $clean_name = function ($value) use ($extension) { return basename($value, $extension); diff --git a/core/lib/Drupal/Core/Config/InstallStorage.php b/core/lib/Drupal/Core/Config/InstallStorage.php index f232f635d084..eceef0162607 100644 --- a/core/lib/Drupal/Core/Config/InstallStorage.php +++ b/core/lib/Drupal/Core/Config/InstallStorage.php @@ -44,7 +44,7 @@ public function getFilePath($name) { $path = FALSE; foreach (array('profile', 'module', 'theme') as $type) { if ($path = drupal_get_path($type, $owner)) { - $file = $path . '/config/' . $name . '.' . self::getFileExtension(); + $file = $path . '/config/' . $name . '.' . static::getFileExtension(); if (file_exists($file)) { return $file; } -- GitLab