Bug #78416 [NEW]: 在使用GD库生成验证码图片的干扰线时报错

From: Date: Thu, 15 Aug 2019 02:31:42 +0000
Subject: Bug #78416 [NEW]: 在使用GD库生成验证码图片的干扰线时报错
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222254@lists.php.net to get a copy of this message
From: 115233618 at qq dot com Operating system: CentOS 7.3 X64 PHP version: 7.2.21 Package: Unknown/Other Function Bug Type: Bug Bug description:在使用GD库生成验证码图片的干扰线时报错 Description: ------------ PHP Fatal error: Invalid opcode 23/16/8. in /wwwroot/web/protected/controller/VerifyController.php on line 41 VerifyController.php文件第41行代码: imagesetpixel($this->im,$this->width,$this->height,$this->point_color);//生成干扰像素 Test script: --------------- function set_point(){ if(empty($this->point_num)){ $this->point_num=100; } for($i=0;$i<$this->point_num;$i++){ $this->point_color=imagecolorallocate($this->im,mt_rand(0,255),mt_rand(0,255),mt_rand(0,255));//生成干扰像素颜色 imagesetpixel($this->im,$this->width,$this->height,$this->point_color);//生成干扰像素 } } Expected result: ---------------- 在png画布上生成干扰线,代码在php 7.2.18以下可以正常运行 Actual result: -------------- 环境升级到php7.2.21后该段代码运行报错: PHP Fatal error: Invalid opcode 23/16/8. -- Edit bug report at https://bugs.php.net/bug.php?id=78416&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78416&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78416&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78416&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78416&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78416&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78416&r=support Expected behavior: https://bugs.php.net/fix.php?id=78416&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78416&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78416&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78416&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78416&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78416&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78416&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78416&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78416&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78416&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78416&r=mysqlcfg

« previous php.bugs (#222254) next »