0ca75d87eb7fb30915d3c9ea28faf505f126934e
Since PHP 8.2 a DateInterval created by DateInterval::createFromDateString() exposes only "from_string" and "date_string" instead of the y/m/d/h/i/s fields, and "from_string" is ignored when assigned to. Rebuilding such an interval by copying its visible properties onto a new DateInterval therefore produced a zero interval, so a copied interval silently stopped shifting dates. Read the properties once and rebuild a date-string interval from the string it was created from, leaving the existing property copy for every other interval. Cloning would also fix it but would invoke __clone() on userland DateInterval subclasses, which #76 explicitly rules out.
Languages
PHP
100%