Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When installing latest drupal-7.x on Ubuntu 14.04, once installed error message show as below:
Notice: Array to string conversion in _menu_router_build() (line 3627 of includes/menu.inc)
Refer to #1844478: Installing OP on PHP5.4.4 gives many PHP notices this can be solved by update:
array_multisort($sort, SORT_NUMERIC, $menu, SORT_STRING);
As:
array_multisort($sort, SORT_NUMERIC, $menu, SORT_ASC);
System environment:
- OS: Ubuntu 14.04 LTS
- Web server: Apache/2.4.7
- Database system version: 5.5.37-0ubuntu0.14.04.1
- PHP: 5.5.9-1ubuntu4.1
Comments
Comment #1
hswong3i CreditAttribution: hswong3i commentedComment #2
hswong3i CreditAttribution: hswong3i commentedComment #3
hswong3i CreditAttribution: hswong3i commentedIt is just DruStack's issue, fixed by http://cgit.drupalcode.org/drustack/commit/?id=40cbd5b
Comment #5
brenk28 CreditAttribution: brenk28 commentedJust wanted to point out that the patch referenced in #3 (https://drupal.org/files/issues/object_conversion_menu_router_build-9725...) doesn't actually match up with original post. The patch is adding SORT_STRING to the call, not replacing it with SORT_ASC. Actually adding that patch for me is what causes the warnings to display once the site is installed. (Running Drupal 7.34 with the environment outlined in the original description.)
The patch mentioned in #3 came from the comment #1 in this thread: https://www.drupal.org/node/972536, so probably best to go there if running into this problem.