mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-18 06:22:38 +00:00
* Fix another PHP5.3 array issue
This commit is contained in:
@@ -35,10 +35,10 @@ class HttpTimeProvider implements ITimeProvider
|
||||
)
|
||||
));
|
||||
$fd = fopen($this->url, 'rb', false, $context);
|
||||
$headers = stream_get_meta_data($fd)['wrapper_data'];
|
||||
$headers = stream_get_meta_data($fd);
|
||||
fclose($fd);
|
||||
|
||||
foreach ($headers as $h) {
|
||||
foreach ($headers['wrapper_data'] as $h) {
|
||||
if (strcasecmp(substr($h, 0, 5), 'Date:') === 0)
|
||||
return \DateTime::createFromFormat('D, d M Y H:i:s O+', trim(substr($h,5)))->getTimestamp();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user