From 0d2c38b482dcfd7eb379265616e1ec42bf10ee74 Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Sun, 6 Feb 2022 22:03:24 +0100 Subject: [PATCH] fix PHP 8.1 deprecation notices in demo/plugins/cacheresource.pdo.php Fixes #706 --- CHANGELOG.md | 3 +++ demo/plugins/cacheresource.pdo.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c76850b..f5d51ec5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- PHP 8.1 deprecation notices in demo/plugins/cacheresource.pdo.php [#706](https://github.com/smarty-php/smarty/issues/706) + ### Added - PHP8.1 compatibility [#713](https://github.com/smarty-php/smarty/pull/713) diff --git a/demo/plugins/cacheresource.pdo.php b/demo/plugins/cacheresource.pdo.php index a80cd698..ae3ebbf7 100644 --- a/demo/plugins/cacheresource.pdo.php +++ b/demo/plugins/cacheresource.pdo.php @@ -196,7 +196,7 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom * @return void * @access protected */ - protected function fetch($id, $name, $cache_id = null, $compile_id = null, &$content, &$mtime) + protected function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime) { $stmt = $this->getFetchStatement($this->fetchColumns, $id, $cache_id, $compile_id); $stmt->execute(); @@ -244,7 +244,7 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom * @return boolean success * @access protected */ - protected function save($id, $name, $cache_id = null, $compile_id = null, $exp_time, $content) + protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content) { $stmt = $this->pdo->prepare($this->insertStatement); $stmt->bindValue('id', $id);