-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix GH-15123: var_dump doesn't actually work on XMLReader #15130
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit strange to have initialized properties when the object is actually not initialized?
It seems a bit strange to have initialized properties when the object is actually not initialized?
Perhaps uninitialized isn't the right word. The error basically happens because you're reading a the isEmptyElement
property before actually reading anything. The fact that other properties are able to be read is perhaps a bit weird (except for properties like depth maybe) but changing that would be a painful BC break.
Ah okay, yeah I think the error wording maybe should be improved then, as I thought it was similar to a DateTime object not being properly initialized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what to do about the error message, but the rest seems OK
What about something like "Failed to read property because no XML data has been read yet" ?
I think that is indeed a better error message! :)
92627d8
to
b1f5d9e
Compare
Targeting master because it changes long standing behaviour, although what it currently does is useless anyway...