Closed (works as designed)
Project:
Drupal core
Version:
7.12
Component:
menu system
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2012 at 16:02 UTC
Updated:
8 Mar 2012 at 07:44 UTC
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
Comment #1
pingers commentedRemember 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:
Comment #2
carlmcdade commentedThanks,
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.