Skip to content

Promote warnings to errors in strpbrk() - #4598

Closed
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:strpbrk-errors2warnings
Closed

Promote warnings to errors in strpbrk()#4598
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:strpbrk-errors2warnings

Conversation

@Girgias

Copy link
Copy Markdown
Member

Split from #4554

Comment threadext/standard/string.c Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative here would be to drop the warning instead and return false -- this is consistent with searching for an empty list of characters, which will never be found.

Not sure whether that's actually a good idea though.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion in this, maybe let internals decide?

@Girgias

Copy link
Copy Markdown
MemberAuthor

Should this be converted to an Error or dropped all together?

@Girgias

Copy link
Copy Markdown
MemberAuthor

Ping @nikic, should I bring this up on internals?

@nikic

Copy link
Copy Markdown
Member

@Girgias Let's go with the error for now. LG modulo switch to ValueError.

@Girgias
Girgiasforce-pushed the strpbrk-errors2warnings branch from 99f15bd to af929c0CompareNovember 20, 2019 22:36
@Girgias
Girgias deleted the strpbrk-errors2warnings branch November 21, 2019 23:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Girgias@nikic@krakjoe@kocsismate@carusogabriel