|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
a.shpota Smarty n00b
Joined: 03 Jun 2016 Posts: 3
|
Posted: Sat Jun 04, 2016 10:09 am Post subject: Broken 5.3 compatibility in 'empty($smarty.capture.name)' |
|
|
smarty code
Code: |
{capture name=capture_name}
capture content
{/capture}
{if !empty($smarty.capture.capture_name)}
{$smarty.capture.capture_name}
{/if}
|
compiled to condition:
Code: |
...
<?php if (!empty($_smarty_tpl->smarty->ext->_capture->getBuffer($_smarty_tpl, 'capture_name'))) {?>
...
|
Quote: | Prior to PHP 5.5, empty() only supports variables |
Thanks. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Jun 04, 2016 2:51 pm Post subject: |
|
|
Update your PHP then, 5.3 is 2 years out of even security patching. |
|
Back to top |
|
a.shpota Smarty n00b
Joined: 03 Jun 2016 Posts: 3
|
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Jun 06, 2016 3:51 pm Post subject: |
|
|
I have two large projects on hand, one was written for 5.2, one was written even before PHP5 was a thing.
Both run just fine under 5.3 after just a few tweaks here and there, and passed tests under 5.5.
Firing new hosting space for both with 5.6 right now, but I'm fairly confident there will be no major issues. Only benefits. |
|
Back to top |
|
|
|
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
|