fooleap/disqus-php-api

jwt.php 在 PHP5 下报错

poplite opened this issue · 1 comments

$ php -v
PHP 5.5.9-1ubuntu4.24 (cli) (built: Mar 16 2018 12:41:43)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

$ php jwt.php
PHP Fatal error:  Default value for parameters with a class type hint can only be NULL in /xxx/jwt.php on line 60

换用 PHP7 之后正常。

出错原因:https://stackoverflow.com/questions/8522984/type-hinting-default-parameters/8523033#8523033

不好意思,更新前没测试其他版本的 PHP,已修复。