mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-09 05:08:36 +00:00
Timezone: return false if date_parse() fails
I hate this, but I don't want to change it to throw right now because it'll create a bunch of extra work.
This commit is contained in:
parent
fcc9e62c65
commit
76f1add3b3
@ -203,6 +203,9 @@ abstract class Timezone{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$parsed = date_parse($offset);
|
$parsed = date_parse($offset);
|
||||||
|
if($parsed === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$offset = $parsed['hour'] * 3600 + $parsed['minute'] * 60 + $parsed['second'];
|
$offset = $parsed['hour'] * 3600 + $parsed['minute'] * 60 + $parsed['second'];
|
||||||
|
|
||||||
//After date_parse is done, put the sign back
|
//After date_parse is done, put the sign back
|
||||||
|
Loading…
x
Reference in New Issue
Block a user