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

Fatal error when parsing shared library files #19

Closed
bobbingwide opened this issue Mar 25, 2016 · 1 comment
Closed

Fatal error when parsing shared library files #19

bobbingwide opened this issue Mar 25, 2016 · 1 comment
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

The original logic in oikai_pseudo_reflect() would use Reflection function logic against the actual class, method or function if it was already loaded

We also tested if docblock comments were actually available. WP Engine's code stripped them.

When parsing an updated shared library file this logic led to a Fatal error due to differences between the actual file being parsed and the file that had been loaded. In our case the file we were parsing was libs/bobbfunc.php ( part of oik ) which is shared by oik-bwtrace. The version loaded by oik-bwtrace was older so the start and end line numbers for the functions were different.

Solution

In addition to testing if docblock comments are available, check if shared libraries have been loaded.
If they have then don't trust the code that's already been loaded. It may not match the code we want to parse.

@bobbingwide bobbingwide self-assigned this Mar 25, 2016
@bobbingwide bobbingwide added this to the V1.28.0 or v2.0.0 milestone Mar 25, 2016
bobbingwide added a commit that referenced this issue Mar 26, 2016
1. Use pragmatic links in a multisite environment.  Issue #18
2. Force loading of the file when oik-lib is active. Issue #19
bobbingwide added a commit that referenced this issue Apr 2, 2016
@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 20, 2019

This was mostly fixed by the changes to in b02269b with the function oikai_using_libs()

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

No branches or pull requests

1 participant