0

While installing the Drupal Open Publish 7, there is notice message, repeating more than 100 times saying

Notice: Array to string conversion in _menu_router_build() (line 3603 of /Applications/MAMP/htdocs/njpg.org.np/includes/menu.inc).

I don't want to hide this notice message but fix this. How Can I do this?

I have installed Drupal Open Publish 7 on MAMP 3 with PHP 5.4.10 and Apache 2 / OS X 10.7. Is it a MAMP specific error or something else?

2 Answers 2

3

Change line 3603 in includes/menu.inc to:

array_multisort($sort, SORT_NUMERIC, $menu, SORT_ASC);

That should fix the issue.

2
  • May be it is line 3603?
    – Prabhu
    Jul 28, 2013 at 5:50
  • 1
    @Prabhu: yeah whatever line matching this statement. Change it. Jul 28, 2013 at 5:53
0

I changed the line 3603 in includes/menu.inc as suggested by Amal Murali. Previously the line had

array_multisort($sort, SORT_NUMERIC, $menu, SORT_STRING);

I changed it to

array_multisort($sort, SORT_NUMERIC, $menu, SORT_ASC);

This solved the problem


There seems problem with parameters in array_multisort() function. The documentation gives the syntax of array_multisort() as

array_multisort(array1,sorting order,sorting type,array2,sorting order...)

Where, array1 and array2 are array to be sorted, sorting order is SORT_ASC or SORT_DESC and sorting type is type of variable to use to be sorted. Sorting order and sorting type is optional.

1
  • 1
    @ Prabhu: The line number is the only thing that's different. You could have edited the other answer and marked it as complete, since there's not much difference between these two :) Jul 29, 2013 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.