diff options
author | Tristan Darricau <github@nicofuma.fr> | 2015-01-16 10:05:23 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2015-01-16 10:05:23 +0100 |
commit | 0344e61b8cd5d3964bcfae147e2bebc8c74fa3be (patch) | |
tree | 543d810a507a24bd3222900a846a07d6c98b213c /phpBB/includes/functions.php | |
parent | f616d9169ee7117fc47f3eac0d42568e2668a2fa (diff) | |
parent | 63da128ee5891971cc9e4f283572e0198174d692 (diff) | |
download | forums-0344e61b8cd5d3964bcfae147e2bebc8c74fa3be.tar forums-0344e61b8cd5d3964bcfae147e2bebc8c74fa3be.tar.gz forums-0344e61b8cd5d3964bcfae147e2bebc8c74fa3be.tar.bz2 forums-0344e61b8cd5d3964bcfae147e2bebc8c74fa3be.tar.xz forums-0344e61b8cd5d3964bcfae147e2bebc8c74fa3be.zip |
Merge pull request #3237 from MGaetan89/ticket/12487
[ticket/12487] Update PHP code
* MGaetan89/ticket/12487:
[ticket/12487] Update PHP code
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 212630a101..0390f3dacb 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -376,8 +376,7 @@ function still_on_time($extra_time = 15) { static $max_execution_time, $start_time; - $time = explode(' ', microtime()); - $current_time = $time[0] + $time[1]; + $current_time = microtime(true); if (empty($max_execution_time)) { @@ -802,7 +801,7 @@ function phpbb_own_realpath($path) $max = sizeof($bits) - 1; - // Check if we are able to resolve symlinks, Windows cannot. + // Check if we are able to resolve symlinks, Windows (prior to Vista and Server 2008) cannot. $symlink_resolve = (function_exists('readlink')) ? true : false; foreach ($bits as $i => $bit) @@ -3664,38 +3663,12 @@ function phpbb_checkdnsrr($host, $type = 'MX') return (@gethostbyname($host_fqdn) == $host_fqdn) ? false : true; } - // checkdnsrr() is available on Windows since PHP 5.3, - // but until 5.3.3 it only works for MX records - // See: http://bugs.php.net/bug.php?id=51844 - - // Call checkdnsrr() if - // we're looking for an MX record or - // we're not on Windows or - // we're running a PHP version where #51844 has been fixed - - // checkdnsrr() supports AAAA since 5.0.0 - // checkdnsrr() supports TXT since 5.2.4 - if ( - ($type == 'MX' || DIRECTORY_SEPARATOR != '\\' || version_compare(PHP_VERSION, '5.3.3', '>=')) && - ($type != 'AAAA' || version_compare(PHP_VERSION, '5.0.0', '>=')) && - ($type != 'TXT' || version_compare(PHP_VERSION, '5.2.4', '>=')) && - function_exists('checkdnsrr') - ) + if (function_exists('checkdnsrr')) { return checkdnsrr($host_fqdn, $type); } - // dns_get_record() is available since PHP 5; since PHP 5.3 also on Windows, - // but on Windows it does not work reliable for AAAA records before PHP 5.3.1 - - // Call dns_get_record() if - // we're not looking for an AAAA record or - // we're not on Windows or - // we're running a PHP version where AAAA lookups work reliable - if ( - ($type != 'AAAA' || DIRECTORY_SEPARATOR != '\\' || version_compare(PHP_VERSION, '5.3.1', '>=')) && - function_exists('dns_get_record') - ) + if (function_exists('dns_get_record')) { // dns_get_record() expects an integer as second parameter // We have to convert the string $type to the corresponding integer constant. @@ -3842,11 +3815,6 @@ function msg_handler($errno, $msg_text, $errfile, $errline) $msg_text = $msg_long_text; } - if (!defined('E_DEPRECATED')) - { - define('E_DEPRECATED', 8192); - } - switch ($errno) { case E_NOTICE: |