|
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 |
tiger42 Smarty n00b
Joined: 14 Dec 2015 Posts: 4
|
Posted: Fri Mar 04, 2016 2:49 pm Post subject: Bug in isCached function |
|
|
The git commit 825aa26079319988c1c52bea095e3b8251598c63 from March, 1st by user "uwetews" seems to have introduced a bug into the isCached() function, which breaks my unit tests...
Here is a short example to reproduce the bug (I use PHP 7.0.3 (CLI) under Linux):
Code: |
<?php
require 'smarty/libs/Smarty.class.php';
$smarty = new \Smarty();
$smarty->setTemplateDir('.');
$smarty->setCompileDir('/tmp');
$smarty->setCacheDir('/tmp');
$smarty->setCaching(1);
$smarty->fetch('test.tpl');
var_dump($smarty->isCached('test.tpl'));
var_dump($smarty->isCached('test.tpl'));
|
The first var_dump correctly prints out "bool(true)", the second one throws a PHP warning:
Code: |
PHP Warning: Attempt to assign property of non-object in /var/www/smarty/libs/Smarty.class.php on line 1054
|
|
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Mar 04, 2016 4:56 pm Post subject: |
|
|
Thanks for bringing this up.
The fix is in the master branch |
|
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
|