diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-11 09:12:52 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-12 20:13:31 -0400 |
| commit | 635460fa6dda70be8ae8b36c4c4be012c9c0a590 (patch) | |
| tree | 09ef439ec6b37dee8caa2eab178923a39bdedead /phpBB/includes | |
| parent | 169c4377e98826432411db773ebcbfa19bcdb439 (diff) | |
| download | forums-635460fa6dda70be8ae8b36c4c4be012c9c0a590.tar forums-635460fa6dda70be8ae8b36c4c4be012c9c0a590.tar.gz forums-635460fa6dda70be8ae8b36c4c4be012c9c0a590.tar.bz2 forums-635460fa6dda70be8ae8b36c4c4be012c9c0a590.tar.xz forums-635460fa6dda70be8ae8b36c4c4be012c9c0a590.zip | |
[feature/template-engine] Fixed reference usage.
Hopefully this is right, I have not checked it against the manual
(assuming the manual even covers these things).
PHPBB3-9726
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/template/context.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/template/renderer_eval.php | 2 | ||||
| -rw-r--r-- | phpBB/includes/template/renderer_include.php | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/phpBB/includes/template/context.php b/phpBB/includes/template/context.php index c667282f7b..695f6e0ed3 100644 --- a/phpBB/includes/template/context.php +++ b/phpBB/includes/template/context.php @@ -68,11 +68,15 @@ class phpbb_template_context public function get_data_ref() { - return $this->tpldata; + // returning a reference directly is not + // something php is capable of doing + $ref = &$this->tpldata; + return $ref; } public function get_root_ref() { + // rootref is already a reference return $this->rootref; } diff --git a/phpBB/includes/template/renderer_eval.php b/phpBB/includes/template/renderer_eval.php index a3d7f88fa5..f3365ff8a7 100644 --- a/phpBB/includes/template/renderer_eval.php +++ b/phpBB/includes/template/renderer_eval.php @@ -50,7 +50,7 @@ class phpbb_template_renderer_eval implements phpbb_template_renderer */ public function render($context, $lang) { - $_template = &$this->template; + $_template = $this->template; $_tpldata = &$context->get_data_ref(); $_rootref = &$context->get_root_ref(); $_lang = &$lang; diff --git a/phpBB/includes/template/renderer_include.php b/phpBB/includes/template/renderer_include.php index aca3a3634d..28a8027df3 100644 --- a/phpBB/includes/template/renderer_include.php +++ b/phpBB/includes/template/renderer_include.php @@ -50,7 +50,7 @@ class phpbb_template_renderer_include implements phpbb_template_renderer */ public function render($context, $lang) { - $_template = &$this->template; + $_template = $this->template; $_tpldata = &$context->get_data_ref(); $_rootref = &$context->get_root_ref(); $_lang = &$lang; |
