Skip to content
Snippets Groups Projects
Commit b310d198 authored by catch's avatar catch
Browse files

Issue #1333940 by yesct, quietone, pingers, chx, catch: Try to use is_file()...

Issue #1333940 by yesct, quietone, pingers, chx, catch: Try to use is_file() instead of file_exists() in DrupalKernel::findSitePath()
parent 585b94e1
No related branches found
No related tags found
2 merge requests!11197Issue #3506427 by eduardo morales alberti: Remove responsive_image.ajax from hook,!10223132456: Fix issue where views instances are emptied before an ajax request is complete
Pipeline #413850 passed with warnings
Pipeline: drupal

#413857

    Pipeline: drupal

    #413853

      Pipeline: drupal

      #413851

        ......@@ -404,7 +404,7 @@ public static function findSitePath(Request $request, $require_settings = TRUE,
        // Determine whether multi-site functionality is enabled. If not, return
        // the default directory.
        if (!file_exists($app_root . '/sites/sites.php')) {
        if (!is_file($app_root . '/sites/sites.php')) {
        return 'sites/default';
        }
        ......@@ -435,10 +435,10 @@ public static function findSitePath(Request $request, $require_settings = TRUE,
        // If the identifier is a key in $sites, check for a directory matching
        // the corresponding value. Otherwise, check for a directory matching
        // the identifier.
        if (isset($sites[$site_id]) && file_exists($app_root . '/sites/' . $sites[$site_id])) {
        if (isset($sites[$site_id]) && is_dir($app_root . '/sites/' . $sites[$site_id])) {
        $site_id = $sites[$site_id];
        }
        if (file_exists($app_root . '/sites/' . $site_id . '/settings.php') || (!$require_settings && file_exists($app_root . '/sites/' . $site_id))) {
        if (is_file($app_root . '/sites/' . $site_id . '/settings.php') || (!$require_settings && is_file($app_root . '/sites/' . $site_id))) {
        return "sites/$site_id";
        }
        }
        ......@@ -649,7 +649,7 @@ public function discoverServiceProviders() {
        $this->serviceProviderClasses['app'][$module] = $class;
        }
        $filename = dirname($filename) . "/$module.services.yml";
        if (file_exists($filename)) {
        if (is_file($filename)) {
        $this->serviceYamls['app'][$module] = $filename;
        }
        }
        ......@@ -1663,7 +1663,7 @@ protected static function setupTrustedHosts(Request $request, $host_patterns) {
        * A list of service files.
        */
        protected function addServiceFiles(array $service_yamls) {
        $this->serviceYamls['site'] = array_filter($service_yamls, 'file_exists');
        $this->serviceYamls['site'] = array_filter($service_yamls, 'is_file');
        }
        /**
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment