diff options
-rw-r--r-- | system/plugins/captcha_pi.php | 10 | ||||
-rw-r--r-- | user_guide/changelog.html | 13 |
2 files changed, 18 insertions, 5 deletions
diff --git a/system/plugins/captcha_pi.php b/system/plugins/captcha_pi.php index 693fd9117..7aa31efb1 100644 --- a/system/plugins/captcha_pi.php +++ b/system/plugins/captcha_pi.php @@ -244,7 +244,15 @@ function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = // Create image
// -----------------------------------
- $im = ImageCreate($img_width, $img_height);
+ // PHP.net recommends imagecreatetruecolor(), but it isn't always available
+ if (function_exists(imagecreatetruecolor))
+ {
+ $im = imagecreatetruecolor($img_width, $img_height);
+ }
+ else
+ {
+ $im = imagecreate($img_width, $img_height);
+ }
// -----------------------------------
// Assign colors
diff --git a/user_guide/changelog.html b/user_guide/changelog.html index e48db0e24..230627abe 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -74,11 +74,16 @@ Change Log </ul>
</li>
<li>Helpers
- <ul>
- <li>Modified <kbd>img()</kbd> in the <a href="helpers/html_helper.html">HTML Helper</a> to remove an unneeded space (#4208).</li>
- <li>Modified <kbd>anchor()</kbd> in the <a href="helpers/url_helper.html">URL helper</a> to convert entities in the title attribute (#4209).</li>
- </ul>
+ <ul>
+ <li>Modified <kbd>img()</kbd> in the <a href="helpers/html_helper.html">HTML Helper</a> to remove an unneeded space (#4208).</li>
+ <li>Modified <kbd>anchor()</kbd> in the <a href="helpers/url_helper.html">URL helper</a> to convert entities in the title attribute (#4209).</li>
+ </ul>
</li>
+ <li>Plugins
+ <ul>
+ <li>Modified captcha generation to first look for the function imagecreatetruecolor, and fallback to imagecreate if it isn't available (#4226).</li>
+ </ul>
+ </li>
</ul>
<h3>Bugfixes for 1.6.2</h3>
|