Errors when including global.php
I want to implement an external user registration functionality.
I use this code to include global.php
chdir('../forum');
require_once('./global.php');
However, upon doing this I receive these errors:
Notice: Undefined variable: errfile in /home/wa/public_html/forum/includes/functions_log_error.php on line 136
Warning: array_keys(): The first argument should be an array in /includes/functions.php on line 3090
Notice: Undefined variable: errfile in /home/wa/public_html/forum/includes/functions_log_error.php on line 136
Warning: Invalid argument supplied for foreach() in /includes/functions.php on line 3090
Fatal error: Call to a member function on a non-object in /home/wa/public_html/forum/includes/functions.php on line 2379
functions.php line 2379 =
$temps = $vbulletin->db->query_read("
SELECT title, template
FROM " . TABLE_PREFIX . "template
WHERE templateid IN (" . implode(',', $templateids) . ")
");
functions.php line 3090 =
foreach(array_keys($vbulletin->forumcache) AS $forumid)
{
foreach($membergroupids AS $usergroupid)
{
$user['forumpermissions']["$forumid"] |= $vbulletin->forumcache["$forumid"]['permissions']["$usergroupid"];
}
}
Anyone know what is wrong and why?
|