-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix Error in Ods.php Reader for some files #1137
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
Catch Uncaught Error Call to undefined method DOMText::hasAttributeNS() in Ods.php Reader
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.
Code Style only
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.
Instead of loosely testing the existence of a method, it would be best to accurately test the expected type of child, and also extract DomElement specific code into a private method, to make it easier to understand what's going on.
Also tests and changelog would be nice too.
Yes, that whole code is a little complicated to read. I did not event find out what the rest of the code was dooing, so I catched for the obvious. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Faced the same Uncaught Error Call to undefined method DOMText::hasAttributeNS() in Ods.php Reader during some imports. Applied the fix provided at #1137 (comment) and my imports are working again. |
Superseded by PR #4087. |
#804 Catch Uncaught Error Call to undefined method DOMText::hasAttributeNS() in Ods.php Reader
This is:
Checklist:
Why this change is needed?
Some ODS files have a childNode of type DOMText, instead of DOMElement only. This tiny fix allows to read these files.