• Resolved paschoolboards

    (@paschoolboards)


    We are having our logs bombarded with undefined offsets. I have seen mutliple posts dating back as far as 2018 and yet this is still not fixed. On a low traffic site, I had over 100k entries in 15 minutes. There are 3 lines of code where this happens. 1160, 153x and 3340. I was able to fix these by doing array_key_exists(index, array) calls, but I know they will get overwritten with every update (especially forced updates!). Just because accessing an unknown offset doesn’t crash the script doesn’t mean it should be ignored. If you need, I am happy to provide you with the patches I have applied.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor loginizer

    (@loginizer)

    Hi,

    We have applied the changes to avoid such Notices on the lines you mentioned.

    If you could send the patch you have applied we can compare it to make sure we did not miss anything. Please send the patch file via support ticket at :
    https://softaculous.deskuss.com/open.php?topicId=16

    Also we did fix the Notices reported in the other topics opened earlier but it seems somehow we are missing few each time.

    We have made changes to our dev environment so we see the Notices on our server before we release the new version so this does not happen in the future.

    Thread Starter paschoolboards

    (@paschoolboards)

    Line 1160:

            for ($j = 0; $j < $x_length; ++$j) { // ie. $i = 0
                if (array_key_exists($j, $x_value) && array_key_exists(0, $y_value))
                {
                    $temp = $x_value[$j] * $y_value[0] + $carry; // $product_value[$k] == 0
                    $carry = (int) ($temp / 0x4000000);
                    $product_value[$j] = (int) ($temp - 0x4000000 * $carry);
                }
            }
    

    Line 153x:

            for ($i = count($dividend) - 1; $i >= 0; --$i) {
                $temp = 0x4000000 * $carry + ((array_key_exists($i, $dividend)) ? $dividend[$i] : 0);
                $result[$i] = (int) ($temp / $divisor);
                $carry = (int) ($temp - $divisor * $result[$i]);
            }
    

    Line 34xx ( in function _trim):

            for ($i = count($value) - 1; $i >= 0; --$i) {
              if (array_key_exists($i, $value))
              {
                if ($value[$i] ) {
                    break;
                }
                unset($value[$i]);
              }
            }
    
    Plugin Contributor loginizer

    (@loginizer)

    Thank you!

    We have updated the changes in our local repo and it will be included in the next version of Loginizer.

    Plugin Contributor loginizer

    (@loginizer)

    Hi,

    We have released Loginizer v1.6.5 which resolves the issue.

    Thank you for reporting the issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined Offset in IPV6/BigInteger.php’ is closed to new replies.