For some reason, the "Create content" menu item was displaying for Anon, even though there was nothing in that tree or at that path. (Anon can only create a certain type of content, but that has been moved to its own top-level navigation item.)
To solve this, I used hook_menu_alter():
/**
* Remove "create content" from the menu if the user is anon
*/
function odp_menu_alter(&$items){
global $user;
if ($user->uid == 0) {
unset($items['node/add']);
}
}
For some reason, this also influenced the superuser account. I disabled the module with that code. Now the Create Content link is back, but it leads to this error:
Fatal error: Unsupported operand types in modules\system\system.module on line 626
All the subtree links that were below Create Content still work.
I've flushed all the caches. What is happening?