hmm...
Okay, I had to fix some other bugs in my dev code because I cannot use 1.1 due to php 7.3.
I tracked back this to two errors.
In sources/subs/PaidSubscription.subs.php please find:
// Do the span.
preg_match('~(\d*)(\w)~', $row['length'], $match);
if (isset($match[2]))
{
$num_length = $match[1];
$length = $match[1] . ' ';
switch ($match[2])
{
case 'D':
$length .= $txt['paid_mod_span_days'];
$num_length *= 86400;
break;
case 'W':
$length .= $txt['paid_mod_span_weeks'];
$num_length *= 604800;
break;
case 'M':
$length .= $txt['paid_mod_span_months'];
$num_length *= 2629743;
break;
case 'Y':
$length .= $txt['paid_mod_span_years'];
$num_length *= 31556926;
break;
}
}
else
$length = '??';
and replace the block with:
// Do the span.
preg_match('~(\d*)(\w)~', $row['length'], $match);
if ($row['length'] != 'F' && isset($match[2]))
{
$num_length = (int) $match[1];
$length = $match[1] . ' ';
switch ($match[2])
{
case 'D':
$length .= $txt['paid_mod_span_days'];
$num_length *= 86400;
break;
case 'W':
$length .= $txt['paid_mod_span_weeks'];
$num_length *= 604800;
break;
case 'M':
$length .= $txt['paid_mod_span_months'];
$num_length *= 2629743;
break;
case 'Y':
$length .= $txt['paid_mod_span_years'];
$num_length *= 31556926;
break;
}
}
else
{
$length = '??';
$num_length = 0;
}
The code is between line 458 and 488.
@Spuds what do you think of my change:
if ($row['length'] != 'F' && isset($match[2]))
I think it could even only be:
if ($row['length'] != 'F')
because as far as I can see, $match[2] is always set, because the first capture is either empty of a number, so the index 2 will always be there.
Am I missing something?