Closed tchemineau closed 12 years ago
With this simple code:
public function before () { parent::before(); $v = 'test'; View::bind_global('V', $v); }
I got the following error in Kohana 3.2:
2011-08-10 07:54:45 --- ERROR: ErrorException [ 1 ]: Class 'Smarty' not found ~ MODPATH/smarty/classes/view.php [ 45 ] 2011-08-10 07:54:45 --- STRACE: ErrorException [ 1 ]: Class 'Smarty' not found ~ MODPATH/smarty/classes/view.php [ 45 ] -- #0 [internal function]: Kohana_Core::shutdown_handler() #1 {main
With the following output:
MODPATH/smarty/classes/view.php [ 45 ] 40 * @param mixed referenced variable 41 * @return void 42 */ 43 public static function bind_global($key, & $value) { 44 View::$_global_data[$key] = &$value; 45 Smarty::$global_tpl_vars[$key] = new Smarty_variable($value, $nocache); 46 Smarty::$global_tpl_vars[$key]->value = &$value; 47 return $this; 48 } 49 50 /**
Using _View::setglobal seems to work well. I notice that _View::bingglobal want to use a _Smartyvariable object; maybe this class is not loaded ?
Oops, don't know how I missed this before.
Fixed: https://github.com/MrAnchovy/Kohana_Smarty3/commit/ec11599b51f32824a1ff62064108e559c422965a
With this simple code:
I got the following error in Kohana 3.2:
With the following output:
Using _View::setglobal seems to work well. I notice that _View::bingglobal want to use a _Smartyvariable object; maybe this class is not loaded ?