ID: 26297
User updated by: daniel at cyberprune dot com
Reported By: daniel at cyberprune dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.3.4
New Comment:
Found problem
Previous Comments:
------------------------------------------------------------------------
[2003-11-18 04:52:07] daniel at cyberprune dot com
Description:
------------
Fatal error: Cannot redeclare get_total_topics() (previously declared
in
/vhost/rollo/rollo.cyberprune.com/portal/exoops/modules/newbb_plus/functions.php:2)
in
/vhost/rollo/rollo.cyberprune.com/portal/exoops/modules/newbb_plus/functions.php
on line 2
Reproduce code:
---------------
<?php
function get_total_topics($forumid)
{
global $db, $bbTable;
if ($forum_id) {
$sql = "SELECT COUNT(*) AS total FROM ".$bbTable['topics']." WHERE
forum_id = '$forum_id'";
} else {
$sql = "SELECT COUNT(*) AS total FROM ".$bbTable['topics'];
}
if (!$result = $db->query($sql)) {
return(_ERROR);
}
if (!$myrow = $db->fetch_array($result)) {
return(_ERROR);
}
return($myrow['total']); }
Expected result:
----------------
Function to work
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26297&edit=1