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

Invalid path for compatiblity directory in Compatibility->wpmdbc_disable_theme function. #128

Open
yanmorinokamca opened this issue Oct 27, 2021 · 0 comments

Comments

@yanmorinokamca
Copy link

Seen in master branch and in wp-migrate-db-pro 2.2.0:
https://github.com/deliciousbrains/wp-migrate-db/blob/master/class/Common/Compatibility/Compatibility.php#L68

The invalid path for compatiblity directory cause realpath function to return false, and $theme_root become an absolute path from the /temp-theme/ folder. This absolute path is outside of allowed path in my open_basedir configuration and cause a fatal error preventing normal migration.

Note that this error is raised by wordpress class-wp-theme-json-resolver.php that try to open File(/temp-theme/theme.json)

A solution could be to use three back path: /../../../ instead of only one /../.
or to use the variable $GLOBALS['wpmdb_meta']['wp-migrate-db-pro']['abspath']

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

No branches or pull requests

1 participant