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

Second xpath() approach for XML version detection #12

Merged
merged 1 commit into from
Jun 23, 2014
Merged

Second xpath() approach for XML version detection #12

merged 1 commit into from
Jun 23, 2014

Conversation

yireo
Copy link
Contributor

@yireo yireo commented Jun 23, 2014

When upgrading my local environment from PHP 5.4 to PHP 5.5, suddenly the get_module_version() function failed. After some research I found that the xpath() method of SimpleXML has issues with the // syntax to find the version-element. This patch adds a workaround for detecting the version in a different way, if the original approach fails (like in my case).

When upgrading my local environment from PHP 5.4 to PHP 5.5, suddenly the get_module_version() function failed. After some research I found that the xpath() method of SimpleXML has issues with the // syntax to find the version-element. This patch adds a workaround for detecting the version in a different way, if the original approach fails (like in my case).
astorm added a commit that referenced this pull request Jun 23, 2014
Second xpath() approach for XML version detection
@astorm astorm merged commit 394599a into astorm:master Jun 23, 2014
@astorm
Copy link
Owner

astorm commented Jun 23, 2014

Any idea why //module didn't work for you but //version did?

@yireo
Copy link
Contributor Author

yireo commented Jun 23, 2014

Good question. No. It seemed as if the //module worked because the element exists two levels up from the root (depending on how you count) while //version is 4 levels up.

@astorm
Copy link
Owner

astorm commented Jun 23, 2014

Weird — if you have a moment (and there's no sensative information), would you mind adding your config.xml to this issue thread so I can look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants