Skip to content

ext/standard: Deprecate passing null to readdir(), rewinddir(), and closedir() #19423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Aug 8, 2025

@@ -160,6 +160,8 @@ PHP_FUNCTION(dir)
static php_stream* php_dir_get_directory_stream_from_user_arg(php_stream *dir_stream)
{
if (dir_stream == NULL) {
php_error_docref(NULL, E_DEPRECATED,
"Passing null is deprecated, instead the last opened directory stream should be provided");
Copy link

@alecpl alecpl Aug 9, 2025

Choose a reason for hiding this comment

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

I think "the last opened" should be replaced by "a" here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The objective of the message is to indicate how to get rid of the deprecation without altering behaviour.
Replacing "the last opened" by "a" is unhelpful here.

@Girgias Girgias merged commit dc0962c into php:master Aug 9, 2025
9 checks passed
@Girgias Girgias deleted the 8.5-dir-dep branch August 9, 2025 17:08
Sign up for free to 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.

3 participants