diff --git a/CHANGELOG.md b/CHANGELOG.md index fa5961c..e9342f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,12 @@ All Notable changes to `Spark Plug` will be documented in this file -## [0.1.2](https://github.com/rougin/transcribe/compare/v0.1.0...v0.1.2) - 2015-09-18 +## [0.1.2](https://github.com/rougin/spark-plug/compare/v0.1.0...v0.1.2) - 2015-09-18 ### Fixed - Issues on defined constants -## [0.1.1](https://github.com/rougin/transcribe/compare/v0.1.0...v0.1.1) - 2015-09-15 +## [0.1.1](https://github.com/rougin/spark-plug/compare/v0.1.0...v0.1.1) - 2015-09-15 ### Added - Namespaces diff --git a/bin/codeigniter.php b/bin/codeigniter.php index 16f867a..1981ff8 100644 --- a/bin/codeigniter.php +++ b/bin/codeigniter.php @@ -1,5 +1,5 @@ getCodeIgniter(); diff --git a/src/SparkPlug.php b/src/SparkPlug.php index 5b34a5a..0f9555b 100644 --- a/src/SparkPlug.php +++ b/src/SparkPlug.php @@ -176,8 +176,13 @@ protected function setPaths() foreach ($iterator as $file) { $core = 'core' . DIRECTORY_SEPARATOR . 'CodeIgniter.php'; - if (strpos($file->getPathname(), $core) !== FALSE) { - define('BASEPATH', str_replace($core, '', $file->getPathname())); + if (strpos($file->getPathname(), $core) !== FALSE) { + if ( ! defined('BASEPATH')) { + define( + 'BASEPATH', + str_replace($core, '', $file->getPathname()) + ); + } break; }