mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
PHP8.2 compatibility : Fixed unit tests
This commit is contained in:
@@ -22,7 +22,7 @@ class Smarty_Internal_Runtime_Make_Nocache
|
||||
{
|
||||
if (isset($tpl->tpl_vars[ $var ])) {
|
||||
$export =
|
||||
preg_replace('/^Smarty_Variable::__set_state[(]|[)]$/', '', var_export($tpl->tpl_vars[ $var ], true));
|
||||
preg_replace('/^\\\\?Smarty_Variable::__set_state[(]|[)]$/', '', var_export($tpl->tpl_vars[ $var ], true));
|
||||
if (preg_match('/(\w+)::__set_state/', $export, $match)) {
|
||||
throw new SmartyException("{make_nocache \${$var}} in template '{$tpl->source->name}': variable does contain object '{$match[1]}' not implementing method '__set_state'");
|
||||
}
|
||||
|
@@ -206,6 +206,7 @@ class StreamResourceTest extends PHPUnit_Smarty
|
||||
}
|
||||
}
|
||||
|
||||
#[AllowDynamicProperties]
|
||||
class ResourceStream
|
||||
{
|
||||
private $position;
|
||||
|
@@ -391,6 +391,7 @@ class Security extends Smarty_Security
|
||||
{
|
||||
|
||||
}
|
||||
#[AllowDynamicProperties]
|
||||
class ResourceStreamSecurity
|
||||
{
|
||||
private $position;
|
||||
|
@@ -15,6 +15,11 @@
|
||||
*/
|
||||
class CompileRegisteredObjectFunctionTest extends PHPUnit_Smarty
|
||||
{
|
||||
/**
|
||||
* @var RegObject
|
||||
*/
|
||||
private $object;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->setUpSmarty(__DIR__);
|
||||
|
Reference in New Issue
Block a user