Wrong code
Kiam@avpnet.org - July 20, 2008 - 08:56
| Project: | XML Sitemap |
| Version: | 6.x-0.x-dev |
| Component: | xmlsitemap_node |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
There is a little bug. The module contains the following code:
<?php
function _xmlsitemap_user_frontpage() {
static $uid;
if (!isset($uid)) {
$uid = 0;
$frontpage = explode('/', drupal_get_normal_path(variable_get('site_frontpage', 'node')));
if (count($frontpage == 2) && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
$uid = $frontpage[1];
}
}
return $uid;
}
?>The line
<?php
if (count($frontpage == 2) && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
?>should be written
<?php
if (count($frontpage) == 2 && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
?>