Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Detect if DateTimeObj::setSettings is available or not

  • Loading branch information...
commit 970ba2f0f2530b2347f5fa235e4673e67fab5b1f 1 parent 4b85f40
@brendo brendo authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/image.php
View
7 lib/image.php
@@ -12,7 +12,12 @@
require_once('class.image.php');
// Setup the environment
- DateTimeObj::setSettings($settings['region']);
+ if(method_exists('DateTimeObj', 'setSettings')) {
+ DateTimeObj::setSettings($settings['region']);
+ }
+ else {
+ DateTimeObj::setDefaultTimezone($settings['region']['timezone']);
+ }
define_safe('MODE_NONE', 0);
define_safe('MODE_RESIZE', 1);
Please sign in to comment.
Something went wrong with that request. Please try again.