Bug #79966 [Wfx]: imagecreatetruecolor has Fatal error

From: Date: Thu, 13 Aug 2020 07:07:04 +0000
Subject: Bug #79966 [Wfx]: imagecreatetruecolor has Fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228559@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79966&edit=1

 ID:                 79966
 Updated by:         cmb@php.net
 Reported by:        dpfender44 at gmail dot com
 Summary:            imagecreatetruecolor has Fatal error
 Status:             Wont fix
 Type:               Bug
 Package:            GD related
 Operating System:   Windows 10 Pro
 PHP Version:        8.0.0beta1
 Block user comment: N
 Private report:     N

 New Comment:

These classes could support conversion to string for BC reasons.


Previous Comments:
------------------------------------------------------------------------
[2020-08-12 22:08:12] requinix@php.net

This is why we ask for a "complete example script".

> With this new "feature" in PHP 8 that objects are not converted to strings,
PHP has never allowed objects to be converted to strings. Not unless they implemented __toString.
Nothing about this has changed for PHP 8.

------------------------------------------------------------------------
[2020-08-12 21:42:01] dpfender44 at gmail dot com

Sorry. Not a bug.  The debug statement following the create statements tried to convert the function
result to string for printing.  When I disabled the debug output, then everything worked as it
should.  With this new "feature" in PHP 8 that objects are not converted to strings, I
need to check a lot of my existing code.  This situation may impact many users and it should be
emphasized as a very incompatible change in this new PHP version.

------------------------------------------------------------------------
[2020-08-12 21:18:10] danack@php.net

exactly which line are you saying gives that error?

I'm pretty sure you aren't including the actual line of code is giving that error in your
bug report, and that the error lies elsewhere.

------------------------------------------------------------------------
[2020-08-12 20:51:03] dpfender44 at gmail dot com

Changed spelling in Summary

------------------------------------------------------------------------
[2020-08-12 20:49:30] dpfender44 at gmail dot com

Test Script:
<?php
$img = imagecreatetruecolor(800, 530);
$img = imagecreate(800, 530);
?>

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=79966


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


Thread (10 messages)

« previous php.bugs (#228559) next »