com web/bugs: Update functions.php: include/functions.php
| From: | Hannes Magnusson | Date: | Tue, 17 Jun 2014 17:45:28 +0000 |
| Subject: | com web/bugs: Update functions.php: include/functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-19285@lists.php.net to get a copy of this message | ||
Commit: da387a9687affbc44427ff33736f64f9507c670c
Author: Boro Sitnikovski <buritomath@yahoo.com> Tue, 17 Jun 2014 12:46:47 +0200
Committer: Boro Sitnikovski <bsitnikovski@sugarcrm.com> Tue, 17 Jun 2014 19:45:28 +0200
Parents: 230365f6a9c9305a19bcaa37cf2ef4e752ee2aff
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=da387a9687affbc44427ff33736f64f9507c670c
Log:
Update functions.php
Validate incoming version
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index b092260..81d3de8 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1288,7 +1288,7 @@ function is_valid_email($email, $phpnet_allowed = true)
*/
function incoming_details_are_valid($in, $initial = 0, $logged_in = false)
{
- global $bug, $dbh, $bug_types;
+ global $bug, $dbh, $bug_types, $ROOT_DIR;
$errors = array();
if (!is_array($in)) {
@@ -1308,7 +1308,8 @@ function incoming_details_are_valid($in, $initial = 0, $logged_in = false)
$errors[] = 'Please select a valid PHP version. If your PHP version is too old, please
upgrade first and see if the problem has not already been fixed.';
}
- if (empty($in['php_version'])) {
+ require_once "{$ROOT_DIR}/include/php_versions.php";
+ if (empty($in['php_version']) || ($initial &&
!in_array($in['php_version'], $versions))) {
$errors[] = 'Please select a valid PHP version.';
}