philsturgeon / codeigniter-template

Template library for CodeIgniter which supports modules, themes, partial views, etc.
411 stars 178 forks source link

Problem with template.php file in CI3.0 #51

Closed secrethash closed 7 years ago

secrethash commented 9 years ago

Hey, I have just upgraded my CI 2.2.0 to the latest CI 3.0.0 when the problem started to occur. After the upgrade everything was working perfectly except when this error showed up:

A PHP Error was encountered Severity: Runtime Notice

Message: Only variables should be assigned by reference

Filename: libraries/Template.php

Line Number: 281

I also read other issues that were opened by other on the same problem and also tried their solution like this one:

public function title() { if (func_num_args() >= 1) { $title_segments = func_get_args(); $this->_title = implode($this->_title_separator, $title_segments); }

return $this;

}

But none of the worked correctly. The above one was worked to an extent except when it destroyed the layout of my website application, from full width it changed the layout to boxed (when I didn't even configured anything like such anywhere in my website). The whole website uses the same layout i.e. full width and not even a single page uses boxed. The above one did worked hiding the error.

I also did a test to check if this was a css problem or a php one. I used the orignal code that you used and it gave the same error. Then I changed environment to production in the index.php. The errors were also gone and the layout was perfect too, but the thing here is I don't want to hide the problem but want to finish it. So please help me doing the same.

Thanks for such a nice library! ;)