Add tests for strlen() with invalid argument types#20795
Closed
distvan wants to merge 1 commit intophp:masterfrom
distvan:master
Closed
Add tests for strlen() with invalid argument types#20795distvan wants to merge 1 commit intophp:masterfrom distvan:master
distvan wants to merge 1 commit intophp:masterfrom
distvan:master
Conversation
ndossche
reviewed
Dec 28, 2025
Member
ndossche
left a comment
There was a problem hiding this comment.
We don't add tests for functions with standard (ZPP) argument parsing.
We also don't support running the test suite on older PHP versions so we don't add PHP version checks in SKIPIF conditions.
Author
|
Thanks for the clarification. |
|
بتتفعوع كم
في الأحد، 28 ديسمبر، 2025، 7:46 م István Döbrentei ***@***.***>
كتب:
… *distvan* left a comment (php/php-src#20795)
<#20795 (comment)>
Thanks for the clarification.
That makes sense — since strlen() uses standard ZPP argument parsing,
these cases are already covered at the engine level and don’t need
function-specific tests.
I’ll close this PR accordingly.
—
Reply to this email directly, view it on GitHub
<#20795 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/B3CRPZO2DNWX4ELXP5LOQNT4EAJN7AVCNFSM6AAAAACQFWSJBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMOJUHEYTKNJSGY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds missing Zend tests for strlen() when called with invalid
argument types that are rejected by the engine before the function
implementation is reached.
Covered cases:
All tests assert the user-visible error message and are placed under
Zend/tests/, consistent with existing strlen invalid-type coverage
(e.g. strlen_deprecation_to_exception.phpt).