Notice message Array to string conversion in _menu_router_build() while installing drupal openpublish in MAMP OS X Lion

StackOverflow https://stackoverflow.com/questions/17904933

Question

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?

Was it helpful?

Solution 2

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.

OTHER TIPS

Change line 3603 in includes/menu.inc to:

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

That should fix the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top