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

两处代码php5.4才能运行 #158

Closed
mickelfeng opened this issue Nov 18, 2015 · 3 comments
Closed

两处代码php5.4才能运行 #158

mickelfeng opened this issue Nov 18, 2015 · 3 comments

Comments

@mickelfeng
Copy link

我使用的php版本是5.3.10 调用文件出错
1、
Wechat/Utils/SignGenerator.php
public function onSortAfter(callable $callback) 中callable

解决办法:去掉 callable
2、
Wechat/Payment/UnifiedOrder.php 中$this 变量范围, 使用use的话也会报错的
Fatal error: Cannot use $this as lexical variable in

    $signGenerator->onSortAfter(function(SignGenerator $that) {
        $that->key = $this->business->mch_key;
    });

解决办法:
$tmp=$this;
$signGenerator->onSortAfter(function(SignGenerator $that) use($tmp) {
$that->key = $tmp->business->mch_key;
});

@overtrue
Copy link
Collaborator

@mickelfeng 感谢反馈!5db4708

@pgyf
Copy link

pgyf commented Jan 14, 2016

php版本必须是 >= 5.5.9吗?5.4可以用吧?

@overtrue
Copy link
Collaborator

@phpyii 3.0 要求 >= 5.5.9, 2.1 >=5.3就好

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

3 participants