Skip to content
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

ext/standard/dir.c: Refactor implementation of Directory and dir functions #18088

Merged
merged 3 commits into from
Apr 3, 2025

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Mar 16, 2025

No description provided.

@Girgias Girgias marked this pull request as ready for review March 17, 2025 14:14
@Girgias Girgias requested a review from nielsdos April 1, 2025 17:56
{
zval *handle_zv = Z_DIRECTORY_HANDLE_P(this_z);
if (UNEXPECTED(Z_TYPE_P(handle_zv) != IS_RESOURCE)) {
zend_throw_error(NULL, "internal directory stream has been altered");
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a type error (same below)? Doesn't matter much.
Also shouldn't the error messages start with capital letter (as they're not argument errors)

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know if this should be a TypeError, as normally a non-initialized object is an Error

Copy link
Member

Choose a reason for hiding this comment

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

It doesn't matter much, fine by me.

@Girgias Girgias requested a review from nielsdos April 3, 2025 18:16
@nielsdos
Copy link
Member

nielsdos commented Apr 3, 2025

CI failures are legit

@Girgias Girgias merged commit 68665d3 into php:master Apr 3, 2025
9 checks passed
@Girgias Girgias deleted the dir_refactoring branch April 3, 2025 22:18
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.

None yet

2 participants