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

preg_replace unicode 的兼容问题 #515

Closed
springjk opened this issue Oct 13, 2016 · 2 comments
Closed

preg_replace unicode 的兼容问题 #515

springjk opened this issue Oct 13, 2016 · 2 comments

Comments

@springjk
Copy link
Contributor

我用的环境

PHP 版本:5.6.11
overtrue/wechat 版本:3.1

在一些无法支持修改环境的虚拟主机上正则\P不被支持

Warning: preg_replace(): Compilation failed: support for \P, \p, and \X has not been compiled at offset 1 in /var/www/virtual/crgb/home/wwwroot/wp-content/plugins/wechat-broadcast/vendor/overtrue/wechat/src/Core/Http.php on line 280

Catchable fatal error: Argument 1 passed to EasyWeChat\Core\AbstractAPI::checkAndThrow() must be of the type array, boolean given, called in ***/home/wwwroot/wp-content/plugins/wechat-broadcast/vendor/overtrue/wechat/src/Core/AbstractAPI.php on line 135 and defined in ***/home/wwwroot/wp-content/plugins/wechat-broadcast/vendor/overtrue/wechat/src/Core/AbstractAPI.php on line 228
@springjk
Copy link
Contributor Author

因为在虚拟主机上无法进行扩展安装和版本升级,故 fuckTheWeChatInvalidJSON 函数中的正则不被支持,我参考 正则文档 修改提交了 pull-516,能否合并这个兼容处理。

springjk added a commit to springjk/wechat that referenced this issue Oct 19, 2016
overtrue pushed a commit that referenced this issue Oct 19, 2016
* fix bug for xml preg_replace

* fix bug for #515
@springjk
Copy link
Contributor Author

Merged #519

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