Commit c95d7252 authored by David_Rothstein's avatar David_Rothstein

Issue #2228825 by donquixote | pingwin4eg: Fixed drupal_get_filename() does...

Issue #2228825 by donquixote | pingwin4eg: Fixed drupal_get_filename() does not search the filesystem when the file isn't yet listed in the {system} table in the database.
parent a28e032e
......@@ -852,7 +852,7 @@ function drupal_get_filename($type, $name, $filename = NULL) {
try {
if (function_exists('db_query')) {
$file = db_query("SELECT filename FROM {system} WHERE name = :name AND type = :type", array(':name' => $name, ':type' => $type))->fetchField();
if (file_exists(DRUPAL_ROOT . '/' . $file)) {
if ($file !== FALSE && file_exists(DRUPAL_ROOT . '/' . $file)) {
$files[$type][$name] = $file;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment