Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 6cff34e

Browse files
committed
Fixed test for detecting php apc extension (postive result even if apc was not loaded)
1 parent 81d9fdc commit 6cff34e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

core/src/core/tests/test.PHP_APC.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ public function __construct() { parent::__construct("PHP APC extension", "Pydio
3232
public function doTest()
3333
{
3434
$this->failedLevel = "warning";
35-
$v = @extension_loaded('apc');
36-
if (isSet($v) && (is_numeric($v) || strtolower($v) == "on")) {
35+
36+
if (extension_loaded('apc')) {
37+
$this->failedInfo = "PHP APC extension detected, this is good for better performances";
38+
$this->testedParams["PHP APC extension loaded"] = "Yes";
39+
return TRUE;
40+
} else {
3741
$this->testedParams["PHP APC extension loaded"] = "No";
38-
return FALSE;
39-
} else if (!isSet($v)) {
4042
$this->failedInfo = "Pydio framework loads a lot of PHP files at each query, and using a PHP accelerator is greatly recommanded.";
4143
return FALSE;
4244
}
43-
$this->failedInfo = "PHP APC extension detected, this is good for better performances";
44-
$this->testedParams["PHP APC extension loaded"] = "Yes";
45-
return TRUE;
4645
}
4746
}

0 commit comments

Comments
 (0)