PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, March 17, 2022

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

 March 17, 2022     apache, drupal, mamp, osx-lion, php     No comments   

Issue

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?


Solution

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.



Answered By - Prabhu
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing