-
Notifications
You must be signed in to change notification settings - Fork 63
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
报错Warning: current() expects parameter 1 to be array, null given in vendor\flc\alidayu\src\Alidayu\Client.php on line 129 #6
Comments
你的请求返回值是Null,json解析空也是Null,然后用来current取值就报参数应该是个数组,不能用Null值。 |
是的。一般出現這種情況,是網絡原因導致的。建議在最外層增加一個 |
|
@xualen 这个问题你解决了没有? |
这块我重新发布一个版本专门修复下吧! |
已修复。已更新packagist |
@flc1125 可以的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
代码如下:
require '/vendor/flc/alidayu/autoload.php';
use Flc\Alidayu\Client;
use Flc\Alidayu\App;
use Flc\Alidayu\Requests\AlibabaAliqinFcSmsNumSend;
use Flc\Alidayu\Requests\IRequest;
// 配置信息
$config = array(
'app_key' => '......',
'app_secret' => '......'
);
// 使用方法一
$client = new Client(new App($config));
$req = new AlibabaAliqinFcSmsNumSend;
$req->setRecNum('13000000000')
->setSmsParam([
'number' => rand(100000, 999999)
])
->setSmsFreeSignName('...')
->setSmsTemplateCode('SMS_10000000');
$resp = $client->execute($req);
报错:
Warning: current() expects parameter 1 to be array, null given in E:\web\vendor\flc\alidayu\src\Alidayu\Client.php on line 129
The text was updated successfully, but these errors were encountered: