Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Fuelphp ver 1.7.3 Function name must be a string
wesley305
July 2015
Hi !
I have no problem with Fuelphp ver 1.7.2 But I get this error on 1.7.3. (
Function name must be a string
)
I'm trying to pass a function to a view.
Below is my code.
$sayhello = function() {
echo 'Hello World !';
};
$view = View::forge('welcome/index');
$view->sayhello = $sayhello;
echo $view;
--------------------------
On my view file:
<?php $sayhello(); ?>
Can anyone able to help me ?
Thanks
philipptempel
July 2015
I think this topic relates to your problem:
http://fuelphp.com/forums/discussion/13529/closure-in-version-1-7-3
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,089
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
261
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
philipptempel
July 2015