Skip to content

Commit 06057e1

Browse files
author
François Jacquet
committed
Check PHP version
1 parent 53177a4 commit 06057e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

diagnostic.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// TRANSLATION: do NOT translate these since error messages need to stay in English for technical support
33
error_reporting(1);
44
session_start();
5+
6+
//modif Francois: check PHP version
7+
if (version_compare(PHP_VERSION, '5.3.2') == -1) {
8+
$error[] = 'RosarioSIS requires PHP 5.3.2 to run, you version is : ' . PHP_VERSION;
9+
}
10+
511
if(!$_SESSION['STAFF_ID'])
612
{
713
$unset_username = true;
@@ -79,7 +85,7 @@ function _ErrorMessage($errors,$code='error')
7985
$return .= '<b><span style="color:#00CC00">Note:</span></b>';
8086
$return .= '<ul>';
8187
foreach($errors as $value)
82-
$return .= '<LI><span class="size-1">$value</span></LI>'."\n";
88+
$return .= '<LI><span class="size-1">'.$value.'</span></LI>'."\n";
8389
$return .= '</ul>';
8490
}
8591
$return .= "</TD></TR></TABLE><BR />";

0 commit comments

Comments
 (0)