<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>I get the following error after uploading to 3.57 - imagecolorsforindex(): Argument #2 ($color) is out of range in lib/image_functions.php on line 152.</title>
        <link>https://interactivetools.com/forum/forum-posts.php?I-get-the-following-error-after-uploading-to-3_57---imagecolorsforindex-Argument-2-color-is-out-of-range-in-lib-image_functions_php-on-line-152_-82642</link>
        <description></description>
        <pubDate>Mon, 20 Apr 2026 05:53:01 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;I-get-the-following-error-after-uploading-to-3_57---imagecolorsforindex-Argument-2-color-is-out-of-range-in-lib-image_functions_php-on-line-152_-82642" rel="self" type="application/rss+xml" />

                <item>
          <title>I get the following error after uploading to 3.57 - imagecolorsforindex(): Argument #2 ($color) is out of range in lib/image_functions.php on line 152.</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2246445#post2246445</link>
          <description><![CDATA[<p>Hi Gary,</p>
<p>I've found a fix for this bug, which should be included in the next CMSB release version. If you'd like to patch it in the meantime, you can replace this line in cmsb/lib/image_functions.php (at/around line 152)</p>
<pre class="language-php"><code>    $transparentColor = @imagecolorsforindex($sourceImage, $transparentIndex);</code></pre>
<p>With this:</p>
<pre class="language-php"><code>    $transparentColor = false;
    if ($transparentIndex &gt;= 0) {
      $transparentColor = @imagecolorsforindex($sourceImage, $transparentIndex);
    }</code></pre>
<p>Let me know if you have any further questions!</p>
<p>Thanks,</p>]]></description>
          <pubDate>Mon, 20 Feb 2023 16:29:51 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2246445#post2246445</guid>
        </item>
                <item>
          <title>I get the following error after uploading to 3.57 - imagecolorsforindex(): Argument #2 ($color) is out of range in lib/image_functions.php on line 152.</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2246440#post2246440</link>
          <description><![CDATA[<p>Will do - thank you!</p>
]]></description>
          <pubDate>Tue, 14 Feb 2023 03:24:10 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2246440#post2246440</guid>
        </item>
                <item>
          <title>I get the following error after uploading to 3.57 - imagecolorsforindex(): Argument #2 ($color) is out of range in lib/image_functions.php on line 152.</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2246429#post2246429</link>
          <description><![CDATA[<p>Hi Gary, </p>
<p>Thanks for the report.  It looks like this is a new issue introduced by PHP 8: </p>
<p>From: <a href="https://www.php.net/manual/en/function.imagecolorsforindex.php" rel="nofollow">https://www.php.net/manual/en/function.imagecolorsforindex.php</a></p>
<blockquote>
<p>imagecolorsforindex() now throws a ValueError exception if color is out of range; previously, false was returned instead.</p>
</blockquote>
<p>If you still have that GIF available could you email it to me at dave@interactivetools.com?  We'll try to reproduce the issue and add some code to workaround it.</p>
<p>Thanks!</p>
]]></description>
          <pubDate>Mon, 13 Feb 2023 20:39:03 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2246429#post2246429</guid>
        </item>
                <item>
          <title>I get the following error after uploading to 3.57 - imagecolorsforindex(): Argument #2 ($color) is out of range in lib/image_functions.php on line 152.</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2246418#post2246418</link>
          <description><![CDATA[<p>I just upgraded a system to 3.57 (I know, I'm a little late to the party).  After doing so, I went to upload a logo for them that was in GIF format.  After selecting the file and clicking on Upload, I received the following error:</p>
<p><span>imagecolorsforindex(): Argument #2 ($color) is out of range in /home/folder/public_html/cmsAdmin/lib/image_functions.php on line 152.</span></p>
<p><span>Rather than trying to diagose the issue, I simply saved it as a JPG and the upload was fine.  I have to say, we have not had a gif in years, so I'm not sure if it just started happening or not.  It could be mere coincidence.</span></p>
<p><span>I just wanted to report it in case there was something anyone know about it.</span></p>
<p><span>We are using PHP 8.1 on this site.</span></p>
]]></description>
          <pubDate>Tue, 07 Feb 2023 14:15:07 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2246418#post2246418</guid>
        </item>
              </channel>
    </rss>
  