From cf2758717e3daaf21ff337723682032db54d6aad Mon Sep 17 00:00:00 2001 From: Sonny Le Date: Tue, 11 Oct 2022 14:37:19 +0700 Subject: [PATCH] Fix issue Undefined constant ASTROID_JOOMLA_VERSION --- framework/library/astroid/Helper/Client.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/library/astroid/Helper/Client.php b/framework/library/astroid/Helper/Client.php index 0d4fdc52..d68015cc 100644 --- a/framework/library/astroid/Helper/Client.php +++ b/framework/library/astroid/Helper/Client.php @@ -204,7 +204,10 @@ public function onContentPrepareForm($form, &$data) $loaded = true; } - if (ASTROID_JOOMLA_VERSION == 4 && $loaded) { + $version = new \JVersion; + $version = $version->getShortVersion(); + $version = substr($version, 0, 1); + if ($version == 4 && $loaded) { \JFactory::getDocument()->addScriptDeclaration(' (function(){ var fixed = false;