get_url_data() returns strange error message, submit functional

Started by danielrichter, March 02, 2023, 09:58:02 AM

Previous topic - Next topic

danielrichter

I'm using the following snippet of code inside SMF:

        $fetch_data->get_url_data("some.page", ["action" => "submit", 'id' => 3]);
Submit itself works fine, POST request and values are received, but SMF is throwing an exception:

Quote2: Trying to access array offset on value of type int
Class-CurlFetchWeb.php (Line 296)

should I open a bugreport for this or is the get_url_data() function not intended to be used like this (even if it's working).

Arantor

You shouldn't be passing in the 3 as an int, pass it in as a string.

Advertisement: