Recursive PHP method crashes Apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I call my method Assembler::PrefetchComponents with an array of valid
components and it crashes only when I include the line
"self::PrefetchComponents($dependencies);" Please help me solve the
error in this code.

Here's Assembler::PrefetchComponents:

public static function PrefetchComponents($names)
{
	$failed = array();

	if(sizeof($m_arrComponents) > 0)
	{
		$names = array_filter($names,create_function('$var',
			'return(Assembler::GetComponentByName
			($var))==NULL;'));
	}

	$dependencies = array();

	foreach($names as $name)
	{
		if(self::TryIncludingComponent($name))
		{
			$dependencies = array_merge($dependencies,
				call_user_func(array("Component_$name",
				"Dependencies")));
		}
		else
		{
			$failed[] = $name;
		}
	}

	if(sizeof($failed)!=0)
	{
		sort($failed);
		Error::ThrowError(CBD_NO_COMPONENT, $failed);
	}

	self::PrefetchComponents($dependencies);
}

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux