mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 04:20:32 +02:00
[ticket/9574] Remove conditional PHP<5.2 code
There is a large amount of conditional code for PHP < 5.2 that can be removed with phpBB 3.1. PHPBB3-9574
This commit is contained in:
@@ -1490,7 +1490,7 @@ function validate_username($username, $allowed_username = false)
|
||||
$mbstring = $pcre = false;
|
||||
|
||||
// generic UTF-8 character types supported?
|
||||
if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
|
||||
if (@preg_match('/\p{L}/u', 'a') !== false)
|
||||
{
|
||||
$pcre = true;
|
||||
}
|
||||
@@ -1626,7 +1626,7 @@ function validate_password($password)
|
||||
$pcre = $mbstring = false;
|
||||
|
||||
// generic UTF-8 character types supported?
|
||||
if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
|
||||
if (@preg_match('/\p{L}/u', 'a') !== false)
|
||||
{
|
||||
$upp = '\p{Lu}';
|
||||
$low = '\p{Ll}';
|
||||
|
Reference in New Issue
Block a user