From bbf220a101070550374a9a9c41be46a5a6c3865b Mon Sep 17 00:00:00 2001 From: "spider@dav" Date: Thu, 29 May 2025 08:28:49 -0400 Subject: constant defined check in smartlink --- smartyplugins/function.smartlink.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'smartyplugins') diff --git a/smartyplugins/function.smartlink.php b/smartyplugins/function.smartlink.php index a05e6cf..cdb0515 100644 --- a/smartyplugins/function.smartlink.php +++ b/smartyplugins/function.smartlink.php @@ -68,7 +68,10 @@ function smarty_function_smartlink( $pParams, &$pSmarty=NULL ) { if( $hash['ipackage'] == 'root' ) { $url = BIT_ROOT_URL.$hash['ifile']; } else { - $url = constant( strtoupper( $hash['ipackage'] ).'_PKG_URL' ).$hash['ifile']; + $pkgConst = strtoupper( $hash['ipackage'] ).'_PKG_URL'; + if( defined( $pkgConst ) ) { + $url = constant( strtoupper( $hash['ipackage'] ).'_PKG_URL' ).$hash['ifile']; + } } } else { $url = constant( strtoupper( $gBitSystem->getActivePackage() ).'_PKG_URL' ).$hash['ifile']; -- cgit v1.3