Skip to content

Commit 7976e8b

Browse files
author
Andrés Villagrán
committed
Merge pull request #1 from zsoerenm/patch-1
support Kohana 3.2
2 parents 5eb50c6 + 9d65f97 commit 7976e8b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

classes/imagefly.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ public function __construct()
6464
error_reporting(error_reporting() & ~E_STRICT);
6565

6666
// Set the config
67-
$this->config = Kohana::config('imagefly');
67+
if (version_compare(Kohana::VERSION, '3.2', '<'))
68+
{
69+
// Kohaha 3.1.x config API
70+
$this->config = Kohana::config('imagefly');
71+
}
72+
else
73+
{
74+
// Kohaha 3.2.x config API
75+
$this->config = Kohana::$config->load('imagefly');
76+
}
6877

6978
// Try to create the cache directory if it does not exist
7079
$this->_createCacheDir();

0 commit comments

Comments
 (0)