Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8.1k
[RFC] Deprecate imagedestroy()#19454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -13,7 +13,7 @@ imagecolortransparent($im, $trans_color); | ||||||
| imagefilledrectangle($im, 0,0, 192,36, $trans_color); | ||||||
| $c = imagecolorat($im, 191,35); | ||||||
| imagegif($im, $dest); | ||||||
| imagedestroy($im); | ||||||
| $im = null; | ||||||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I have a feeling that | ||||||
| $im = imagecreatefromgif($dest); | ||||||
| $c = imagecolorat($im, 191, 35); | ||||||
| $colors = imagecolorsforindex($im, $c); | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -15,8 +15,6 @@ if (imagecolorat($im, 9, 0) == 0x000000) { | ||
| } else { | ||
| echo 'Bugged'; | ||
| } | ||
| imagedestroy($im); | ||
| ?> | ||
| --EXPECT-- | ||
| DONE | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -24,8 +24,6 @@ for ($i = 0; $i < 256; $i++) { | ||
| } | ||
| } | ||
| var_dump($white); | ||
| imagedestroy($im); | ||
| ?> | ||
| --EXPECT-- | ||
| int(0) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -33,9 +33,6 @@ fclose($fh); | ||
| $im = imagecreatefromgd2($fname); | ||
| if ($im) { | ||
| imagedestroy($im); | ||
| } | ||
| unlink($fname); | ||
| ?> | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't notice in the RFC, but the consistent wording with the existing functions would be:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we proposed the wording on the RFC, I'd prefer to start with using that message and then we can tweak it in a separate patch if desired; same for the other patches for the no-op deprecations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay with me (that's why I opted just to comment rather than “Request Changes”).