Projekt

Obecné

Profil

Stáhnout (1.48 KB) Statistiky
| Větev: | Revize:
1 cb15593b Cajova-Houba
<?php
2
3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
use Symfony\Polyfill\Php56 as p;
13
14
if (PHP_VERSION_ID < 50600) {
15
    if (!function_exists('hash_equals')) {
16
        function hash_equals($knownString, $userInput) { return p\Php56::hash_equals($knownString, $userInput); }
17
    }
18
    if (extension_loaded('ldap') && !function_exists('ldap_escape')) {
19
        define('LDAP_ESCAPE_FILTER', 1);
20
        define('LDAP_ESCAPE_DN', 2);
21
22
        function ldap_escape($subject, $ignore = '', $flags = 0) { return p\Php56::ldap_escape($subject, $ignore, $flags); }
23
    }
24
25
    if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) {
26
        // Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS
27
        // See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888
28
        if (!function_exists('gzopen') && function_exists('gzopen64')) {
29
            function gzopen($filename, $mode, $use_include_path = 0) { return gzopen64($filename, $mode, $use_include_path); }
30
        }
31
        if (!function_exists('gzseek') && function_exists('gzseek64')) {
32
            function gzseek($zp, $offset, $whence = SEEK_SET) { return gzseek64($zp, $offset, $whence); }
33
        }
34
        if (!function_exists('gztell') && function_exists('gztell64')) {
35
            function gztell($zp) { return gztell64($zp); }
36
        }
37
    }
38
}