Bug #80877 [Com]: imageinterlace(): Argument #2 ($enable) must be of type ?bool, int given

From: Date: Wed, 17 Mar 2021 13:46:22 +0000
Subject: Bug #80877 [Com]: imageinterlace(): Argument #2 ($enable) must be of type ?bool, int given
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232817@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80877&edit=1

 ID:                 80877
 Comment by:         rtrtrtrtrt at dfdfdfdf dot dfd
 Reported by:        hjhjhj at fgfgfg dot ghghgh
 Summary:            imageinterlace(): Argument #2 ($enable) must be of
                     type ?bool, int given
 Status:             Open
 Type:               Bug
 Package:            GD related
 PHP Version:        8.0.3
 Block user comment: N
 Private report:     N

 New Comment:

it's not a problem of the docs when you look at the second comment

PHP8: TypeError: imageinterlace(): Argument #2 ($enable) must be of type ?bool, int given

PHP7: TypeError: imageinterlace() expects parameter 2 to be int, bool given


Previous Comments:
------------------------------------------------------------------------
[2021-03-17 13:10:10] daverandom@php.net

#protip: if you report bugs with a tone that basically says "why are you such an idiot" it
does not make people want to help you.

PHP is an open source project run by volunteers, none of whom are remunerated in any way.
Occasionally mistakes happen. Sometimes it takes a while for docs to be updated - because *everyone
doing it is volunteering their time.*

Be nice.

------------------------------------------------------------------------
[2021-03-17 13:06:28] rtrtrtrtrt at dfdfdfdf dot dfd

are you crazy?

in PHP 7.4 now we have "TypeError: imageinterlace() expects parameter 2 to be int, bool
given" for the same line of code when change it from 1 to TRUE

how do you imagine upgrades to PHP8 that way?

------------------------------------------------------------------------
[2021-03-17 13:03:07] hjhjhj at fgfgfg dot ghghgh

Description:
------------
https://www.php.net/manual/en/function.imageinterlace.php
imageinterlace ( resource $image , int $interlace = 0 ) : int

TypeError: imageinterlace(): Argument #2 ($enable) must be of type ?bool, int given

why the hell don't you throw out warnings in PHP7.4 instead switch from no notice or warning to
a fatal type error and why in the world don't you compare with your documentation in that
special case?



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80877&edit=1


Thread (6 messages)

« previous php.bugs (#232817) next »