Using the following in a module causes the PHP stack to crash and stop inside of the script.


function mymodule_menu_alter(&$items)
{
	//
    $items['user/%user'] = array(
        'access callback' => TRUE,
        'access arguments' => array(1),
    );
	
}

It works fine using any form of FALSE but a true statement in any context does not work.

php 5.3.2
Apache 2
Debian 5

Comments

pingers’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Remember that this is an alter hook. You're initializing a new array and assigning it to 'user/%user'.

Please see the example at http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

What you're trying to do is:

$items['user/%user']['access callback'] = TRUE;
carlmcdade’s picture

Thanks,

I see that using it in the way I did causes tail recursion in the menu system and PHP shuts down after about 215 iterations.