139 |
root |
1 |
<?php |
|
|
2 |
|
|
|
3 |
if (version_compare(phpversion(), '5.0.0', 'lt')) { |
|
|
4 |
|
|
|
5 |
// Configure necessary functions here |
|
|
6 |
$funcs = array( |
|
|
7 |
'stripos', |
|
|
8 |
'http_build_query', |
|
|
9 |
); |
|
|
10 |
|
|
|
11 |
// End configuration |
|
|
12 |
|
185 |
miho |
13 |
// JB: PHP_Compat expects to be able to find functions by including |
|
|
14 |
// 'PHP/Compat/Functions/functionname.php', but that hardcoded path |
|
|
15 |
// isn't relative to the standard include path '.' (it's instead relative |
|
|
16 |
// to './include'). So rather than hack PHP_Compat to work, just add |
|
|
17 |
// './include' to our include path. |
|
|
18 |
ini_set("include_path", ini_get("include_path").$config->pathSeparator."./include"); |
|
|
19 |
|
139 |
root |
20 |
foreach ($funcs as $fn) { |
|
|
21 |
if (PHP_Compat::loadFunction($fn) != true) |
|
|
22 |
error_log('Could not load function `'.$fn.'\' as required by PHP Compat.'); |
|
|
23 |
} |
|
|
24 |
|
|
|
25 |
} |
|
|
26 |
?> |