Welcome Guest, Not a member yet? Register   Sign In
Modular Extensions - (HMVC) - Version 3.1.9

Hello, it is very cool, but i have some warning "Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file"...
What i have to do, it is mistake or not?

[eluser]Edemilson Lima[/eluser]
Does it occur in your code or in the Modular Extensions code? Didn't the error message give any clue about the line where it occurred?

Check php.ini
allow_call_time_pass_reference = Off

Yes this is an issue, I will fix the code. Thanks... check the wiki soon.

Current version is 3.0.2
Fixed `allow_call_time_pass_reference` error. Thanks

There's a typo in the new 3.0.2 in the wiki:

function &load;($modules, $path = '/controllers/', $base = 'modules/')

(you should remove the ";", but I think that's something the forum & wiki add automatically, somehow...

Thanks gerben, stupid wiki. :lol:

Fixed Wink

I've been playing with the new version, but I can't seem to get it to work correctly. Somehow I can't assign modules::run to a variable, because the module gets executed instantly when I try to do that.

Class Main extends Controller
    function Main()

    function index()
    $content = modules::run('home');
        $data = array(
            'title'   => 'My Page',
            'content' => $content,
        $this->load->view('default' , $data);

The content in the home-module is parsed even before the first line of the 'default' view. What am I doing wrong?

In your module you would make it return the View using CI's default method.
return $this->load->view('a_view', $data, TRUE);  //TRUE returns output, FALSE displays it.

If it is a module View instead:
return $this->load->module->view('a_view', $data, TRUE);  //TRUE returns output.

I'll put an example on the wiki too.

[eluser]Edemilson Lima[/eluser]
Quote:In your module you would make it return the View using CI’s default method.

Couldn't it, by default, catch all the output of a module with PHP output buffering and return it to the parent controller? Is this possible or may it make the helper less flexible?

CodeIgniters load->view already uses output buffering, and will return it or output it as required.

Theme © iAndrew 2016 - Forum software by © MyBB