WordPress.org

Make WordPress Core

Opened 16 months ago

Last modified 5 months ago

#47305 reopened defect (bug)

PHP Warning with PHP 7.3

Reported by: onlanka Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2
Component: HTTP API Keywords: reporter-feedback
Focuses: Cc:

Description

My PHP version: 7.3

I can see following error in the error_log

[17-May-2019 11:09:51 UTC] PHP Warning:  http_build_query(): Parameter 1 expected to be Array or Object.  Incorrect value given in /home/onnetsri/public_html/wp-includes/Requests/Transport/cURL.php on line 508

Please make a fix for this issue

Attachments (1)

error_log (1.2 MB) - added by onlanka 16 months ago.
error_log

Download all attachments as: .zip

Change History (9)

@onlanka
16 months ago

error_log

#1 @GaryJ
16 months ago

  • Focuses coding-standards removed

#2 follow-up: @desrosj
16 months ago

  • Component changed from General to HTTP API
  • Keywords reporter-feedback close added

Hi @onlanka,

Thanks for this report!

Can you provide more details? How can someone reproduce this issue to debug further? Does a certain plugin or theme cause the issue? This may be an issue that needs to be reported upstream to the Requests repository on GitHub, but it would help to have more details first.

#3 in reply to: ↑ 2 @onlanka
16 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

I updgraded MySQL 5.7 into MariaDB 10.3.

Still not resolved

Last edited 16 months ago by onlanka (previous) (diff)

#4 @desrosj
16 months ago

  • Keywords needs-patch reporter-feedback close removed
  • Milestone Awaiting Review deleted

#5 @onlanka
16 months ago

  • Keywords needs-patch added
  • Resolution worksforme deleted
  • Status changed from closed to reopened

Sad to say error_log came back

[19-May-2019 02:23:28 UTC] PHP Warning:  http_build_query(): Parameter 1 expected to be Array or Object.  Incorrect value given in /home/onlanka/public_html/wp-includes/Requests/Transport/cURL.php on line 508

How this could be happened?

#6 @onlanka
16 months ago

  • Keywords dev-feedback needs-dev-note added

#7 @desrosj
16 months ago

  • Keywords reporter-feedback added; needs-patch dev-feedback needs-dev-note removed
  • Milestone set to Awaiting Review
  • Severity changed from critical to normal

Hi @onlanka,

The questions in my previous comment still remain. There is not enough information here to debug or take any action.

Can you provide more details? How can someone reproduce this issue to debug further? Does a certain plugin or theme cause the issue?

Any information that would help someone trigger the issue on their install.

#8 @mikeill
5 months ago

I'm not sure if this is relevant so please forgive me if not. I'm using php 7.0 and WordPress 5.4 at the moment and noticed something interesting.

When calling wp_remote_post() with the POST method, the body of the request needs to be json_encoded or fields are not properly transferred.

When calling wp_remote_post() with the GET method, the body of the request seems to work either as an array *or* a json object, but when it is json_encoded, it returns the above mentioned warning.

Note: See TracTickets for help on using tickets.