Closed markbratanov closed 9 years ago
Which versions of Bonfire and CodeIgniter are you using? All I'm getting on line 174 of MX_Loader
is }
.
Additionally, what's on line 314 of /home/site/public_html/sites/path.com/content/index.php
?
Hi, Same problem for me after your commit "Updated CLI error templates from CI 3.0.1".
In my /MX/Loader.php file, line 174:
if ($path === FALSE)
{
$this->_ci_load_library($library, $params, $object_name);
$_alias = $this->_ci_classes[$class];
}
In my /content/index.php file, line 314:
require_once(BASEPATH . 'core/CodeIgniter.php');
Compatibility problem with CI3.0.1?
It looks like I forgot to update Wiredesignz' code somewhere in the last 6 months: https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/commits/c1f1870c5f9873708d45e2eeeee3d91e8a5862c2?at=codeigniter-3.x
I'll run a diff and update the dev branches shortly.
Thank you very much for this regular job !
By the way, as far as I can tell at the moment, all you should need to do to fix this error is remove line 174 from /application/third_party/MX/Loader.php
.
In the interest of keeping track of why this happened for future reference, it's a two-parter:
1) I forgot to update the MX_Loader
on GitHub, possibly because I don't make a regular habit of performing a diff against /application/third_party/MX/
and I was doing too many things at once when I updated my local files with Wiredesignz' updates on bitbucket
2) In ee62fb67c925c8c071b0ca7be6c351b2295424e6 I removed the library()
method from BF_Loader
. The method in BF_Loader
used the following code in the equivalent of MX_Loader
's line 171-184:
if ($path === false) {
// Use $this->_ci_load_library() in CI 3
if (substr(CI_VERSION, 0, 1) != '2') {
$this->_ci_load_library($library, $params, $object_name);
} else {
$this->_ci_load_class($library, $params, $object_name);
$_alias = $this->_ci_classes[$class];
}
} else {
Modules::load_file($_library, $path);
$library = ucfirst($_library);
CI::$APP->$_alias = new $library($params);
$this->_ci_classes[$class] = $_alias;
}
In other words, if you were using CI3 with BF_Loader
's library()
method, the equivalent of line 174 was not present, but if you were using CI2, it was, and everything worked as intended. Because I had updated my local copy of MX_Loader
at the time that I added that method to BF_Loader
, everything worked fine for me when I removed the method from BF_Loader
.
Yes, remove the line 174 of Loader.php corrects this error. It's true that's not easy to maintain multiple sources to update over time.
Thanks again!
Awesome, woke up this morning and this was resolved. Thanks @mwhitneysdsu @Benjer !
Currently receiving this error on a fresh install:
Any ideas?