DateTime error #564

Merged
merged 1 commit into from Oct 12, 2015

Projects

None yet

4 participants

@Dreamvention
Contributor

this error is caused by DateTime settings. please add this to your code

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php:80 Stack trace: #0 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php(80): DateTime->__construct() #1 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(210): Hybrid_Logger::error('Endpoint: Error...') #2 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(117): Hybrid_Endpoint->authInit() #3 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(51): Hybrid_Endpoint->processAuthStart() #4 /home2/markewl7/public_htm in /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php on line 80

@dmitriyzhuk dmitriyzhuk DateTime error
this error is caused by DateTime settings. please add this to your code

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php:80 Stack trace: #0 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php(80): DateTime->__construct() #1 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(210): Hybrid_Logger::error('Endpoint: Error...') #2 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(117): Hybrid_Endpoint->authInit() #3 /home2/markewl7/public_html/guildgear/system/library/Hybrid/Endpoint.php(51): Hybrid_Endpoint->processAuthStart() #4 /home2/markewl7/public_htm in /home2/markewl7/public_html/guildgear/system/library/Hybrid/Logger.php on line 80
9b5dd3e
@StorytellerCZ
Contributor

Thank you!

@StorytellerCZ StorytellerCZ added this to the 2.x milestone Oct 12, 2015
@StorytellerCZ StorytellerCZ merged commit 750f619 into hybridauth:master Oct 12, 2015

1 check passed

Scrutinizer 2 new issues
Details
@hypeJunction hypeJunction commented on the diff Oct 15, 2015
hybridauth/Hybrid/Logger.php
@@ -77,7 +77,7 @@ public static function info($message) {
*/
public static function error($message, $object = null) {
if (isset(Hybrid_Auth::$config["debug_mode"]) && in_array(Hybrid_Auth::$config["debug_mode"], array(true, 'info', 'error'), true)) {
- $dt = new DateTime;
+ $dt = new DateTime('now', new DateTimeZone( 'UTC' ));$dt = new DateTime;
@hypeJunction
hypeJunction Oct 15, 2015 Contributor

Looks like you left the original instance in there.

@Dreamvention
Dreamvention Oct 15, 2015 Contributor

yes, i saw that later and checked what they actually added. AdwinTrave added correctly - he removed that instance of original code.

thanks for noticing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment