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

Improper usage of preg_replace #1

Closed
tomasz-kusy opened this issue Jul 26, 2018 · 0 comments
Closed

Improper usage of preg_replace #1

tomasz-kusy opened this issue Jul 26, 2018 · 0 comments

Comments

@tomasz-kusy
Copy link

tomasz-kusy commented Jul 26, 2018

Hi,
I found problem under Windows enviroment. When i start to install dev version of Revive-adserver, after composer install I had:

_Script asseteer\AssetInstaller::postInstall handling the post-install-cmd event terminated with an exception

[ErrorException]
preg_replace(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 21_

There is an error on line 125 of AssetInstaller.php:
$relativeFilename = preg_replace('#^'.self::$vendorOfAssetsToCopy.'/#', '', $filename);

Value of my self::$vendorOfAssetsToCopy was:
C:\temporary\htdocs\localhost\php7\revive-adserver/lib/vendor/tinymce

Because Windows using \ as path separator self::$vendorOfAssetsToCopy should be properly escaped (?).
Temporary workaround for me was to change it to:
$relativeFilename = str_replace(self::$vendorOfAssetsToCopy, '', $filename);

Regards
TK

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