Just updated to latest dev-versions and here some reports I have currently:

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /Applications/MAMP/htdocs/drupal-7.0-beta/includes/common.inc on line 2134 and defined in drupal_http_build_query() (line 469 of /Applications/MAMP/htdocs/drupal-7.0-beta/includes/common.inc).

PS: Just switched from PHP 5.2.13 to PHP 5.3.2 cause of the errors in the styles-module.

CommentFileSizeAuthor
#17 loginerror.txt91.24 KBAnonymous (not verified)
#14 find-wrong-url-caller.patch680 bytesStevel
#2 find-wrong-url-caller.patch681 bytesStevel

Comments

Anonymous’s picture

Priority: Normal » Major

I have the same error, it arises when I log in to the site as an administrator.

Drupal 7 Beta 3

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /var/www/includes/common.inc on line 2134 and defined in drupal_http_build_query() (line 469 of /var/www/includes/common.inc)

This happens for all logins. So am unable to login to the site!

Stevel’s picture

StatusFileSize
new681 bytes

The function url is being called with $options['query'] not being an array. Could you apply the following patch to get the backtrace to where url is called in a wrong way, and report back the backtrace?

Stevel’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: +PHP 5.3

Postponing this until further information is received. If you have a backtrace, please set back to active.

jcarlson34’s picture

I can reproduce this error using the Link 7.x module link field (default field settings) and a website that has a ? query in it.

Here's an example website link that causes an error when attempted to be saved by the entity: http://www.facebook.com/profile.php?ref=profile&id=500042465

Here is my specific error warnings:

* Notice: Undefined index: enable_tokens in _link_sanitize() (line 472 of /ebs1/www/html/drupal7/sites/all/modules/link/link.module).

* Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /ebs1/www/html/drupal7/includes/common.inc on line 2100 and defined in drupal_http_build_query() (line 473 of /ebs1/www/html/drupal7/includes/common.inc).

It may be a Link module sanitize problem but the printout from the patch in #2 is so large, I just included everything above instead to recreate the issue.

jcarlson34’s picture

Status: Postponed (maintainer needs more info) » Active

Bumping back to active...

jcarlson34’s picture

A patch here: http://drupal.org/node/947050 (see post #1) fixes the link_sanitize issue but my guess is a question mark ending up in an array must be something Drupal's core does not react kindly too.

Anonymous’s picture

Version: 7.x-dev » 7.0-rc2

Still present in RC2 when logging in, so unable to login normally.

Only way round is to try to link to a page that doesn't exist and then the admin menu appears. if you link to a page that does exist I am not logged in,

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /var/www/includes/common.inc on line 2152 and defined in drupal_http_build_query() (line 473 of /var/www/includes/common.inc).

Any suggestions gratefully received, is this a data issue with the login credentials?

Thanks

Anonymous’s picture

Version: 7.0-rc2 » 7.0-rc4
Priority: Normal » Major

Still present when logging in with Drupal 7 RC4 - Chrome 10

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /var/www/includes/common.inc on line 2152 and defined in drupal_http_build_query() (line 473 of /var/www/includes/common.inc).

I would like to up the priority to major as this is a major problem for users logging into my site.

Is there any way to correct this other than the patch method?

Thanks

Stevel’s picture

Version: 7.0-rc4 » 7.x-dev
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Please use the patch from #2 in your testing environment to find out where url is being called with the query-parameter as a string, and paste that back here.

Postponed until a backtrace is given or a pointer to which call to url is wrong.

Anonymous’s picture

Sorry, should have provided this. The URL is:

hostname/home?destination=node/2 which is the home page.

Behaviour is as follows.

Try to login to home page, get the above error.

If I then set url to page that doesn't exist, e.g. hostname/help and then login, login works OK.

Can provide test login if that helps.

Thanks

Nigel

Stevel’s picture

I can't reproduce the error locally. It's probably not a bug in Drupal core, but more likely in a contrib module. Could you apply the patch from #2 and give the backtrace output? (which should appear just before the error message.)

Anonymous’s picture

OK - will do - need to find best way to apply patch, will look this up and try to get back to you ASAP.

Thanks for your help.

Anonymous’s picture

Recoverable fatal error: Argument 1 passed to drupal_http_build_query() must be an array, string given, called in /var/www/includes/common.inc on line 2152 and defined in drupal_http_build_query() (line 473 of /var/www/includes/common.inc).

Have tried to apply patch with dry-run option and get the following error.

ubuntu@ip-xx-xxx-xx-xxx:/var/www/nigel$ sudo cp *.patch /var/www/includes
ubuntu@ip-xx-xxx-xx-xxx:/var/www/nigel$ cd /var/www/includes
ubuntu@ip-xx-xxx-xx-xxx:/var/www/includes$ sudo cp common.inc common.njg
ubuntu@ip-xx-xxx-xx-xxx:/var/www/includes$ sudo patch -p0 --dry-run < find-wrong-url-caller.patch
patching file includes/common.inc
Hunk #1 FAILED at 2052.
1 out of 1 hunk FAILED -- saving rejects to file includes/common.inc.rej

But there is no .rej file.

Sorry noob at patching.

Stevel’s picture

StatusFileSize
new680 bytes

I updated the patch to apply for current HEAD, could you try again with this patch?

Anonymous’s picture

Hi

I tried with the new patch with the following result. I am using RC4.

ubuntu@ip-xx-xxx-xx-xxx:~$ cd /var/www/includes
ubuntu@ip-xx-xxx-xx-xxx:/var/www/includes$ sudo patch -p0 -b < find-wrong-url-caller_0.patch
patching file includes/common.inc
Hunk #1 FAILED at 2071.
1 out of 1 hunk FAILED -- saving rejects to file includes/common.inc.rej
ubuntu@ip-xx-xxx-xx-xxx:/var/www/includes$

However just about to load final D7 release. Will try again after that and post result.

Thanks

Nigel

Anonymous’s picture

Version: 7.x-dev » 7.0

Same error on D7.0

Anonymous’s picture

StatusFileSize
new91.24 KB

Sorry Stevel - my mistake, I was patching from within includes directory.

I have attached the output when accessing the home page.

I have reverted back to backup copy of common.inc

Thanks

Nigel

Anonymous’s picture

I have disabled the Printer Friendly Pages module - this is the cause of the problem.

Sorry to have wasted your time, I will log the problem on the module page.

Nigel

Stevel’s picture

Version: 7.0 » 7.x-dev

That's what I was helping for, so no problem. Bugs still go against -dev though

jcarlson34’s picture

Status: Postponed (maintainer needs more info) » Fixed

Just looking back this thread. It looks to me like all the errors turned out to be contrib instead of from Drupal.

Marking this fixed to clean up the boards a bit. Obviously feel free to reopen if you experience any further occurrence of this.

Status: Fixed » Closed (fixed)
Issue tags: -PHP 5.3

Automatically closed -- issue fixed for 2 weeks with no activity.