Closed (won't fix)
Project:
Bot
Version:
5.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Mar 2008 at 14:48 UTC
Updated:
23 Jun 2008 at 00:15 UTC
The bot module uses the array_intersect_key() function only available in PHP 5 >= 5.1.0. If you're on PHP4, you can grab a PHP4 implementation of the function, written by Rod Byrnes 05-May-2007 09:10:
if (!function_exists('array_intersect_key'))
{
function array_intersect_key($isec, $keys)
{
$argc = func_num_args();
if ($argc > 2)
{
for ($i = 1; !empty($isec) && $i < $argc; $i++)
{
$arr = func_get_arg($i);
foreach (array_keys($isec) as $key)
{
if (!isset($arr[$key]))
{
unset($isec[$key]);
}
}
}
return $isec;
}
else
{
$res = array();
foreach (array_keys($isec) as $key)
{
if (isset($keys[$key]))
{
$res[$key] = $isec[$key];
}
}
return $res;
}
}
}
Just paste that into bot_start.php at the top and you're good to go!
Comments
Comment #1
morbus iffI don't intend to maintain the 5.x branch anymore, and Drupal 6 requires PHP 5. Closing.