Skip to content

[3.0] Handle a unexpected return from fetching web data better - #9875

Open
jdarwood007 wants to merge 1 commit into
SimpleMachines:release-3.0from
jdarwood007:3.0/fixes9871
Open

jdarwood007 wants to merge 1 commit into
SimpleMachines:release-3.0from
jdarwood007:3.0/fixes9871

Conversation

@jdarwood007

Copy link
Copy Markdown
Member

Fixes #9871

@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Nov 12, 2026
@github-actions github-actions Bot added the External data Fetching, processing, and using external data label Nov 12, 2026
@albertlast

Copy link
Copy Markdown
Collaborator

I don't think this changes anything on 3.0. CurlFetcher::result() on release-3.0 already returns early when nothing was recorded:

$max_result = \count($this->response) - 1;

if ($max_result < 0) {
	return null;
}

Past that point $this->response[$max_result] always exists, so the added ?? null can never apply. As the issue itself notes, the $txt half of #9871 does not affect 3.0 either. Is there a case this covers that I'm missing?

@jdarwood007

Copy link
Copy Markdown
Member Author

I think its still a worthwhile check to ensure that we somehow don't escape the upper boundary either. I can't say how it can or provide examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External data Fetching, processing, and using external data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.1.8]: get_url_data() missing $txt

2 participants