Skip to content

Commit

Permalink
#395: Remove 5.4 compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Feb 9, 2021
1 parent 9a1afa0 commit 466bddc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions code/libraries/joomlatools/library/user/session/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ public function __construct(KObjectConfig $config)
parent::__construct($config);

//Session write and close handlers are called after destructing objects since PHP 5.0.5.
if (version_compare(phpversion(), '5.4.0', '>=')) {
session_register_shutdown();
} else {
register_shutdown_function('session_write_close');
}
session_register_shutdown();

//Only configure the session if it's not active yet
if(!$this->isActive())
Expand Down
4 changes: 2 additions & 2 deletions code/plugins/system/joomlatools/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ public function getServerErrors()
Please upgrade Joomla to the latest version first.'), JVERSION);
}

if(version_compare(phpversion(), '5.4', '<'))
if(version_compare(phpversion(), '5.6', '<'))
{
$errors[] = sprintf(JText::_('Your server is running PHP %s which is an old and insecure version.
It also contains a bug affecting the operation of our extensions.
Please contact your host and ask them to upgrade PHP to at least 5.4 version on your server.'), phpversion());
Please contact your host and ask them to upgrade PHP to at least 5.6 version on your server.'), phpversion());
}

if (!function_exists('token_get_all')) {
Expand Down

0 comments on commit 466bddc

Please sign in to comment.