Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ianvizarra opened this issue Mar 17, 2025 · 0 comments · May be fixed by #219
Open

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

ianvizarra opened this issue Mar 17, 2025 · 0 comments · May be fixed by #219

Comments

@ianvizarra
Copy link

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;
    }
}
@ianvizarra ianvizarra linked a pull request Mar 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant