icofileloader icon indicating copy to clipboard operation
icofileloader copied to clipboard

PHP 8.2 issues: Implicit conversion from float and Uninitialized string offset 176

Open ukfreetv opened this issue 1 year ago • 1 comments

Hi,

Thanks for keeping this project up to date. It's very ussefut to my 21-year-old https://ukfree.tv

I'm getting, on PHP 8.2.8 the following two "stop" error messages

  • Uninitialized string offset 176 at line 204 of vendor/lordelph/icofileloader/src/GdRenderer.php
  • Implicit conversion from float 3289.5 to int loses precision on line 210 vendor/lordelph/icofileloader/src/IcoParser.php

I did a "composer bump" to get the most recent versions of code. 3.0.0.

"errline": 210, "backtrace": [ { "file": "IcoParser.php", "line": 210, "function": "substr", "class": "", "type": "" }, { "file": "IcoParser.php", "line": 178, "function": "parsePaletteImageData", "class": "Elphin\\IcoFileLoader\\IcoParser", "type": "->" }, { "file": "IcoParser.php", "line": 78, "function": "parseBmp", "class": "Elphin\\IcoFileLoader\\IcoParser", "type": "->" }

"errline": 225, "backtrace": [ { "file": "GdRenderer.php", "line": 93, "function": "render8bit", "class": "Elphin\\IcoFileLoader\\GdRenderer", "type": "->" }, { "file": "GdRenderer.php", "line": 19, "function": "renderBmpImage", "class": "Elphin\\IcoFileLoader\\GdRenderer", "type": "->" }, { "file": "IcoFileService.php", "line": 93, "function": "render", "class": "Elphin\\IcoFileLoader\\GdRenderer", "type": "->" } ],

Thanks,

ukfreetv avatar Jul 20 '23 05:07 ukfreetv

How do you reproduce that, do you have a specific icon you are loading?

lordelph avatar Jul 20 '23 08:07 lordelph