Skip to content

Commit a02d422

Browse files
committed
Another review
1 parent 4281daa commit a02d422

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

ext/date/php_date.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4193,7 +4193,7 @@ PHP_METHOD(DatePeriod, __construct)
41934193
}
41944194

41954195
if (dpobj->end == NULL && recurrences < 1) {
4196-
zend_argument_error(zend_ce_exception, 3, "must be greater than 0");
4196+
zend_throw_error(zend_ce_exception, "Recurrence count must be greater than 0");
41974197
RETURN_THROWS();
41984198
}
41994199

ext/date/tests/DatePeriod_wrong_recurrence_on_constructor.phpt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ try {
99
}
1010

1111
try {
12-
new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'),-1);
12+
new DatePeriod(new DateTime('yesterday'), new DateInterval('P1D'), -1);
1313
} catch (Exception $exception) {
1414
echo $exception->getMessage(), "\n";
1515
}
16+
1617
?>
1718
--EXPECT--
18-
DatePeriod::__construct(): Argument #3 ($end) must be greater than 0
19-
DatePeriod::__construct(): Argument #3 ($end) must be greater than 0
19+
DatePeriod::__construct(): Recurrence count must be greater than 0
20+
DatePeriod::__construct(): Recurrence count must be greater than 0

ext/intl/calendar/calendar_ce.h

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)