aboutsummaryrefslogtreecommitdiff
path: root/pmwiki.php
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2024-08-12 14:30:17 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2024-08-12 14:30:17 +0000
commit7c5903be70ea82085de4debac21af403450f26bb (patch)
treeae2ba986d81bd60c20d4c81d7168bbfdddf3d360 /pmwiki.php
parent12d38e91923801b557e121c09ccc031a31553a0c (diff)
downloadpmwiki.svn-7c5903be70ea82085de4debac21af403450f26bb.tar.bz2
Update for PHP 8. PmSyntax fix line-height for some skin configurations.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4761 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'pmwiki.php')
-rw-r--r--pmwiki.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/pmwiki.php b/pmwiki.php
index a8c2a36b..1b7e6b24 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -1507,6 +1507,7 @@ function FmtGroupHome($pn,$group,$var) {
## {$$key} in $text with $vars['key'].
function FmtTemplateVars($text, $vars, $pagename = NULL) {
global $FmtPV, $EnableUndefinedTemplateVars;
+ $text = strval($text);
if ($pagename) {
$pat = implode('|', array_map('preg_quote', array_keys($FmtPV)));
$pprc = new PPRC($pagename);
@@ -1514,8 +1515,8 @@ function FmtTemplateVars($text, $vars, $pagename = NULL) {
array($pprc, 'pagevar'), $text);
}
foreach(preg_grep('/^[\\w$]/', array_keys($vars)) as $k)
- if (!is_array($vars[$k]))
- $text = str_replace("{\$\$$k}", @$vars[$k], $text);
+ if (!is_array($vars[$k]) && $text)
+ $text = str_replace("{\$\$$k}", strval(@$vars[$k]), $text);
if (! IsEnabled($EnableUndefinedTemplateVars, 0))
$text = preg_replace("/\\{\\$\\$\\w+\\}/", '', $text);
return $text;