summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspider@dav <spiderr@bitweaver.org>2025-05-29 08:28:49 -0400
committerspider@dav <spiderr@bitweaver.org>2025-05-29 08:28:49 -0400
commitbbf220a101070550374a9a9c41be46a5a6c3865b (patch)
tree1f5bb3d2bf96f73ce074621cf46070cecdf48c7d
parentd45ddce9093b1ce83964fa7f87dbb35f38927f49 (diff)
downloadthemes-bbf220a101070550374a9a9c41be46a5a6c3865b.tar.gz
themes-bbf220a101070550374a9a9c41be46a5a6c3865b.tar.bz2
themes-bbf220a101070550374a9a9c41be46a5a6c3865b.zip
constant defined check in smartlink
-rw-r--r--smartyplugins/function.smartlink.php5
1 files changed, 4 insertions, 1 deletions
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'];