Skip to content

Commit

Permalink
Fix fatal error during new install in PHP 8 because of unset constant
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed Feb 7, 2022
1 parent a8fca16 commit 663466a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions script.php
Expand Up @@ -27,6 +27,7 @@
}
if (!defined('FLEXI_J16GE')) define('FLEXI_J16GE', version_compare( $jversion->getShortVersion(), '1.6.0', 'ge' ) );
if (!defined('FLEXI_J30GE')) define('FLEXI_J30GE', version_compare( $jversion->getShortVersion(), '3.0.0', 'ge' ) );
if (!defined('FLEXI_J40GE')) define('FLEXI_J40GE', version_compare( $jversion->getShortVersion(), '4.0.0', 'ge' ) );

class com_flexicontentInstallerScript
{
Expand Down Expand Up @@ -467,7 +468,9 @@ function postflight( $type, $parent )
'warning'
);*/

echo '<link type="text/css" href="components/com_flexicontent/assets/css/j3x.css?'.FLEXI_VHASH.'" rel="stylesheet">';
echo FLEXI_J40GE
? '<link type="text/css" href="components/com_flexicontent/assets/css/j3x.css" rel="stylesheet">'
: '<link type="text/css" href="components/com_flexicontent/assets/css/j4x.css" rel="stylesheet">';
echo '<link type="text/css" href="components/com_flexicontent/assets/css/flexicontentbackend.css" rel="stylesheet">';

//echo JHtml::_('bootstrap.startAccordion', 'upgrade-tasks', array());
Expand Down Expand Up @@ -1506,7 +1509,9 @@ function uninstall( $parent )
$app = JFactory::getApplication();

// Extra CSS needed for J3.x+
echo '<link type="text/css" href="components/com_flexicontent/assets/css/j3x.css?'.FLEXI_VHASH.'" rel="stylesheet">';
echo FLEXI_J40GE
? '<link type="text/css" href="components/com_flexicontent/assets/css/j3x.css" rel="stylesheet">'
: '<link type="text/css" href="components/com_flexicontent/assets/css/j4x.css" rel="stylesheet">';

// Installed component manifest file version
$this->release = $parent->getManifest()->version;
Expand Down

0 comments on commit 663466a

Please sign in to comment.