summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2014-11-01 20:58:37 -0400
committerDavid Rothstein <drothstein@gmail.com>2014-11-01 20:58:37 -0400
commitc95d72521d31ff2ae4f843979f4ab5a39e633300 (patch)
treee81583c2c5d838381b84a8756a26ed71cf0d4aba /includes
parenta28e032e503943230ef99822fe63af0a8e99af5f (diff)
downloadbrdo-c95d72521d31ff2ae4f843979f4ab5a39e633300.tar.gz
brdo-c95d72521d31ff2ae4f843979f4ab5a39e633300.tar.bz2
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.
Diffstat (limited to 'includes')
-rw-r--r--includes/bootstrap.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index 5bd7c6e52..862fede1c 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -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;
}
}