Support » Plugin: All-in-One Event Calendar » Warning: http_build_query()

  • Resolved kwooduwcv

    (@kwooduwcv)


    When I go to add a new event, I get this message under Event Details:

    Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /var/www/html/wp-includes/Requests/Transport/cURL.php on line 508
    Call Stack
    # Time Memory Function Location
    1 0.0003 368576 {main}( ) …/post-new.php:0
    2 0.2588 12491752 include( ‘/var/www/html/wp-admin/edit-form-advanced.php’ ) …/post-new.php:85
    3 0.4253 13481992 do_meta_boxes( ) …/edit-form-advanced.php:702
    4 0.4255 13481992 Ai1ec_View_Add_New_Event->meta_box_view( ) …/template.php:1050
    5 0.4313 13834152 Ai1ec_Api_Registration->is_ticket_enabled( ) …/add-new-event.php:336
    6 0.4313 13834152 Ai1ec_Api_Registration->has_subscription_active( ) …/api-registration.php:145
    7 0.4316 13834152 Ai1ec_Api_Registration->get_subscriptions( ) …/api-abstract.php:453
    8 0.4337 13816928 Ai1ec_Api_Registration->_get_ticket_calendar( ) …/api-abstract.php:431
    9 0.4338 13816928 Ai1ec_Api_Registration->_find_user_calendar( ) …/api-abstract.php:276
    10 0.4339 13817680 Ai1ec_Api_Registration->request_api( ) …/api-abstract.php:304
    11 0.4340 13818432 wp_remote_request( ) …/api-abstract.php:529
    12 0.4340 13818872 WP_Http->request( ) …/http.php:153
    13 0.4342 13825872 Requests::request( ) …/class-http.php:371
    14 0.4348 13907032 Requests_Transport_cURL->request( ) …/class-requests.php:379
    15 0.4348 13907032 Requests_Transport_cURL->setup_handle( ) …/cURL.php:133
    16 0.4348 13912544 Requests_Transport_cURL::format_get( ) …/cURL.php:323
    17 0.4348 13913128 http_build_query ( ) …/cURL.php:508

    I cannot provide the link since it is on the back end of the website and you’d have to have the login info to my site to see the page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Benjamin

    (@bsokic)

    Hi @kwooduwcv,

    Do you know which PHP version you are using?

    skippywp

    (@skippywp)

    Hope you don’t mind me adding to this thread. Or if you want me to start a new thread let me know.

    I am also having the same issue. I am currently using PHP version: 5.4.45 – used Jonathan’s code from this page to remove the json_encode and it seemed to have cleared up: https://ideas.time.ly/ideas/CAL-I-432. Not sure what if any impact there is by taking the code out, so wondering if that’s okay.
    Before changing the code I also did a reinstall WordPress 4.8.2. Dashboard, Updates, Re-install Now. That didn’t help and continued getting the error, hence the code change.

    Thanks for any insight.

    • This reply was modified 2 months ago by  skippywp. Reason: Needed to update the issue
    skippywp

    (@skippywp)

    Okay, I think I found the answer. As mentioned above, the PHP version was 5.4.45.
    I found a clue about upgrading the PHP version to 5.6+: https://wordpress.org/support/topic/fatal-error-arrays-are-not-allowed-in-class-constants/

    I upgraded the PHP version to 5.6+, put back the json_encode code back into the file and cleared cached. Tested, and I am not seeing the error right now. Hurray!

    I believe the answer is upgrade the PHP to 5.6+.

    Plugin Author Benjamin

    (@bsokic)

    @skippywp, I am glad you find a way through the issue 🙂

    @kwooduwcv, please upgrade PHP if not already.

    Take care,
    Ben

    Although I thought upgrading the PHP to 5.6.30 fixed the issue, but when I logged into the site today and wanted to add a new event, the error was back on the “page”:
    /wp-admin/post-new.php?post_type=ai1ec_eventdetails.

    The error: Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /wp-includes/Requests/Transport/cURL.php on line 508

    It hasn’t impacted the site as far as I can tell, but it would be helpful to know of any other suggestions to clear this up.

    Thanks,
    Skippywp

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.