Gregwar / Captcha

PHP Captcha library
MIT License
1.73k stars 290 forks source link

in php 7.2 . count(null) get a warning 7.2中的count(null) 时报警告 #54

Closed yangmeishu closed 6 years ago

yangmeishu commented 6 years ago

hi man, php 7.2 version ,CaptchBuilder 333 line, count(null) has warning ,i know error_reporting setting ,but wish you fix this bug.

你好,我在php 7.2 版本使用这个组件,但是出现了错误警告,导致不能生成验证码,我知道可以定义 error_report 错误级别忽略,但是本着严谨的态度来说,希望可以修正这个错误。

Gregwar commented 6 years ago

What is your version?

Line 333 doesn't contains count(): https://github.com/Gregwar/Captcha/blob/master/src/Gregwar/Captcha/CaptchaBuilder.php#L333

yangmeishu commented 6 years ago

ha,nice ,my version 1.13 ,in 1.1.4 had fix this issue

Gregwar commented 6 years ago

Indeed :-) Glad you fixed your problem