-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add array|int and object-of-class|int types to stubs #6081
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
Changes from all commits
9adde72
efba6cd
bd50198
bace93f
2389f86
6ae7e1d
5907070
4281daa
0cbe010
ebbf195
68302fe
6cbe3b5
1318bbe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||
--TEST-- | ||||||
Test bad ISO date formats passed to DatePeriod constructor | ||||||
--FILE-- | ||||||
<?php | ||||||
|
||||||
try { | ||||||
$perid = new DatePeriod("R4"); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Or drop the variable :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I don't even know why I added the variables in the first place... :) (I do know indeed: copy-pasted from date_interval_bad_format_leak.phpt) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You copied my typo :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed them during applying the changes in this PR :) |
||||||
} catch (Exception $e) { | ||||||
echo $e->getMessage(), "\n"; | ||||||
} | ||||||
|
||||||
try { | ||||||
$perid = new DatePeriod("R4/2012-07-01T00:00:00Z"); | ||||||
} catch (Exception $e) { | ||||||
echo $e->getMessage(), "\n"; | ||||||
} | ||||||
|
||||||
|
||||||
try { | ||||||
$perid = new DatePeriod("2012-07-01T00:00:00Z/P7D"); | ||||||
} catch (Exception $e) { | ||||||
echo $e->getMessage(), "\n"; | ||||||
} | ||||||
|
||||||
?> | ||||||
--EXPECT-- | ||||||
DatePeriod::__construct(): ISO interval must contain a start date, "R4" given | ||||||
DatePeriod::__construct(): ISO interval must contain an interval, "R4/2012-07-01T00:00:00Z" given | ||||||
DatePeriod::__construct(): ISO interval must contain an end date or a recurrence count, "2012-07-01T00:00:00Z/P7D" given |
Uh oh!
There was an error while loading. Please reload this page.