From 0fa300a696e42483d6ca3a94ba8ce74b7cbea2be Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 20 Oct 2009 01:24:34 +0000 Subject: - Patch #332333 by sun: more fixes for the path API. --- modules/node/node.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/node/node.module') 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']; -- cgit v1.2.3