Skip to content

Commit

Permalink
Fix PHP Fatal error: Cannot declare class modTemplateVarInputRenderTe…
Browse files Browse the repository at this point in the history
…xt (#16410)

Prevent the fallback render method/class to be loaded twice.
  • Loading branch information
JoshuaLuckers authored Oct 3, 2023
1 parent 6d125ec commit 6a2e0b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/Revolution/modTemplateVar.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ public function getRender($params, $value, array $paths, $method, $resourceId =
$className = $method == 'output' ? 'modTemplateVarOutputRenderText' : 'modTemplateVarInputRenderText';
if (!class_exists($className, false) && file_exists($p . 'text.class.php')) {
$className = include $p . 'text.class.php';
$this->registerRenderMethod('text', $method, $className);
}
if (class_exists($className, false)) {
$render = new $className($this);
Expand Down

0 comments on commit 6a2e0b1

Please sign in to comment.