Skip to content

Commit 5cf9e79

Browse files
committed
version check for loading compatibility functions
1 parent 9be73c1 commit 5cf9e79

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

install/lib/install.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
*/
3030
error_reporting(E_ALL|E_STRICT);
3131

32-
require_once 'compatibility.inc.php';
32+
if(version_compare(phpversion(), '7.0', '<')) {
33+
require_once 'compatibility.inc.php';
34+
}
3335

3436
$FILE = realpath('../install.php');
3537

interface/lib/app.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
require_once 'compatibility.inc.php';
31+
if(version_compare(phpversion(), '7.0', '<')) {
32+
require_once 'compatibility.inc.php';
33+
}
3234

3335
//* Enable gzip compression for the interface
3436
ob_start('ob_gzhandler');

server/lib/app.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*/
2929

30-
require_once 'compatibility.inc.php';
30+
if(version_compare(phpversion(), '7.0', '<')) {
31+
require_once 'compatibility.inc.php';
32+
}
3133

3234
// Set timezone
3335
if(isset($conf['timezone']) && $conf['timezone'] != '') { // note: !empty($conf['timezone']) should give the same result and is more idiomatic for current versions of PHP (gwyneth 20220315)

0 commit comments

Comments
 (0)