Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

3.0.4: undefined offset

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
webtweakers
Smarty Rookie


Joined: 20 Apr 2009
Posts: 7

PostPosted: Sat Nov 13, 2010 10:14 pm    Post subject: 3.0.4: undefined offset Reply with quote

I just replaced Smarty3.0-rc3 with Smarty-3.0.4 and now my project's pages won't render: I'm staring at a white screen.

When viewing source, I noticed this error, created by Smarty:

Notice: Undefined offset: 2 in /path/to/smarty-3.0.4/sysplugins/smarty_internal_template.php on line 433

I also noticed that particular line has changed since rc3. It used to read:

Code:

$this->getResourceTypeName($_file_to_check[0], $resource_type, $resource_name);
If ($resource_type == 'file') { ...


Now it reads:

Code:

If ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'extends' || $_file_to_check[2] == 'php') { ...


The contents of $_file_to_check are:

Code:

Array
(
    [0] => /path/to/templates/template.tpl
    [1] => 1289683653
)


So that error message seems to make sense...

I was hoping the 3.0 release to be more stable, but 4 bugfix releases in a few days spells trouble. Need help?

PS: what's with the capital I on php's "If"?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Nov 13, 2010 10:38 pm    Post subject: Reply with quote

After each version update you must delete existing compiled and cached files because of possible internal changes. You have not done this.

As a result of making some (necessary) last minute API changes to 3.0, we did run into some issues that needed attention. We could have let 3.0 run awhile longer, but we felt incremental patches were the best choice to avoid FAQs and retain highest stability.
Back to top
View user's profile Send private message
webtweakers
Smarty Rookie


Joined: 20 Apr 2009
Posts: 7

PostPosted: Sun Nov 14, 2010 2:35 am    Post subject: Reply with quote

Aha, of course, you're right. That fixed it. Thanks! Smile

Great work, btw...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP