summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-10-20 01:24:34 +0000
committerDries Buytaert <dries@buytaert.net>2009-10-20 01:24:34 +0000
commit0fa300a696e42483d6ca3a94ba8ce74b7cbea2be (patch)
treefe63a8305e4d992b507af7a2df2382264b208c5f /modules/node/node.module
parent0d2b7fe81b37ce2ccddca0d6bbd1aa276d20d82e (diff)
downloadbrdo-0fa300a696e42483d6ca3a94ba8ce74b7cbea2be.tar.gz
brdo-0fa300a696e42483d6ca3a94ba8ce74b7cbea2be.tar.bz2
- Patch #332333 by sun: more fixes for the path API.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index b0301e854..f39fef541 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -1258,7 +1258,7 @@ function node_language_provider($languages) {
// We cannot use args now.
$path = explode('/', $path);
// Act only if we are in a node page.
- if ($path[0] == 'node' && $nid = intval($path[1])) {
+ if (isset($path[0]) && isset($path[1]) && $path[0] == 'node' && $nid = intval($path[1])) {
// We cannot perform a node load here.
$result = db_query('SELECT n.language FROM {node} n WHERE n.nid = :nid', array(':nid' => $nid))->fetchAssoc();
return $result['language'];