Skip to content

Increment on type bool has no effect, this will change in the next major version of PHP #218

@ianvizarra

Description

@ianvizarra

Sometimes $diff->days value returns a boolean which causes an exception error on line 126 because it's trying to increment a boolean.

https://github.com/simshaun/recurr/blob/master/src/Recurr/DateUtil.php#L122

$diff  = $dt->diff($start);
$start = $diff->days;

$set = array();
for ($i = $start, $k = 0; $k < 7; $k++) {
    $set[] = $i;
    ++$i; // Increment on type bool has no effect, this will change in the next major version of PHP

    if (null !== $dtInfo && null !== $rule && $dtInfo->wDayMask[$i] == $rule->getWeekStartAsNum()) {
        break;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions