We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$block_templates = new LLMS_Block_Templates(); $windows_path = 'C:\WordPress\src\wp-content\plugins\lifterlms/templates/block-templates/template.html'; $template_slug = $block_templates( $windows_path );
'llms_template' === $template_slug
'llms_dPress\src\wp-content\plugins\lifterlms/templates/block-templates/template' === $template_slug
The path is built here with '/' between the templates and block-templates directories. However, this line uses DIRECTORY_SEPARATOR instead of '/'.
templates
block-templates
DIRECTORY_SEPARATOR
Windows 10 PHP 7.4
This issue has be recreated:
The text was updated successfully, but these errors were encountered:
@pondermatic will replacing: strpos( $path, $dirname . DIRECTORY_SEPARATOR ) + 1 + strlen( $dirname ), with: strpos( $path, $dirname . '/' ) + 1 + strlen( $dirname ),
strpos( $path, $dirname . DIRECTORY_SEPARATOR ) + 1 + strlen( $dirname ),
strpos( $path, $dirname . '/' ) + 1 + strlen( $dirname ),
fix the issue on Windows?
Sorry, something went wrong.
Yes, that will fix the issue.
eri-trabiccolo
Successfully merging a pull request may close this issue.
Reproduction Steps
Expected Behavior
'llms_template' === $template_slug
Actual Behavior
'llms_dPress\src\wp-content\plugins\lifterlms/templates/block-templates/template' === $template_slug
Cause
The path is built here with '/' between the
templates
andblock-templates
directories. However, this line usesDIRECTORY_SEPARATOR
instead of '/'.System and Environment Information
Windows 10
PHP 7.4
This issue has be recreated:
The text was updated successfully, but these errors were encountered: