Answer the question
In order to leave comments, you need to log in
Why is the variable (array) not accepted?
I'm trying to pass an array to a Kohana template..
This is how it works:
$errors = array('111',);
$content = View::factory('index/info/v_info_index')->bind('errors', $errors);
$content = View::factory('index/info/v_info_index')->bind('errors', array('111'));
ErrorException [ Fatal Error ]: Cannot pass parameter 2 by reference
Answer the question
In order to leave comments, you need to log in
Because only variables can be passed by reference.
https://php.net/manual/en/language.references.pass.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question