Welcome Guest, Not a member yet? Register   Sign In
CI2.0 Packages and Modular Extension
#1

[eluser]Unknown[/eluser]
Is there an issue with using packages and Module Extensions?


If I create a simple controller:


../application/controllers/home.php


That contains the following code:


class Home extends Controller {
public function __construct() {
parent::__construct();
}

public function index() {
$this->load->add_package_path(APPPATH . 'third_party/common/');
$this->load->library('view');

echo 'Test';
}
}


...which attempts to load a simple library stored in a package:


../application/third_party/common/libraries/view.php


I get the following error when it tries to execute $this->load->add_package_path() statement:


A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Loader.php
Line Number: 1076


Regards,

Si.
#2

[eluser]wiredesignz[/eluser]
Yes there is an issue with packages and Modular Extensions. I will add that functionality and update Bitbucket soon. In the meantime you could add this code to the MX / Loader.php file at line 233.

Code:
public function _ci_get_component($component) {
    return CI::$APP->$component;
}




Theme © iAndrew 2016 - Forum software by © MyBB