Closed (fixed)
Project:
Devel
Version:
7.x-1.0-beta2
Component:
devel
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Sep 2010 at 18:45 UTC
Updated:
2 Oct 2010 at 09:00 UTC
I have a fresh D7 install and when I enable both Devel and Admin menu I get this:
"warning: htmlspecialchars() expects parameter 1 to be string, array given in ..."
If I disable devel the warning is gone, see this related post where everyone is trying to isolate this warning: https://drupal.org/node/829250
Comments
Comment #1
ccarigna commentedI came across this error as well, and noticed it was being caused by the Switch User block. There was a call to drupal_placeholder(array('text' => $user->name)) for displaying usernames in the switch user block, however it should have been passing in text and not an array. drupal_placeholder() ends up calling check_plain() which also makes a call to htmlspecialchars(), hence the warning from htmlspecialchars() expecting a string and not an array.
It looks like this has been fixed with the current development release, so try the latest 7.x-1.x-dev build of the Devel module.
Comment #2
salvisThank you, cwc!
Core changed the type of the expected parameter in #885000: drupal_placeholder() takes an array as an argument.
If you have a core version older than August 18, you need a Devel version older than August 18.
If you have a core version more recent than August 18, you need a Devel version more recent than August 18.
@stompersly: feel free to reopen if updating Devel doesn't fix the problem.