summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-05-30 22:17:30 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-05-30 22:17:30 +0200
commit555b9cc24532945f6a87741b336db535ac5b68cf (patch)
tree1a71c1f59f972190f91e2ea039adee725c377999 /lib/private/util.php
parentda6aae28ad0cb1bad3d0693f126a5436af64240d (diff)
parent06af8e09da8ceecf33480f7a0a776df0070c8117 (diff)
downloadnextcloud-server-555b9cc24532945f6a87741b336db535ac5b68cf.tar.gz
nextcloud-server-555b9cc24532945f6a87741b336db535ac5b68cf.zip
Merge pull request #7614 from owncloud/test_annotations_working
Check if ReflectionMethod::getDocComment is working
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-xlib/private/util.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index bf7f39ebb20..306e37b9478 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -516,6 +516,12 @@ class OC_Util {
);
$webServerRestart = true;
}
+ if (!self::isAnnotationsWorking()) {
+ $errors[] = array(
+ 'error'=>'PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible.',
+ 'hint'=>'This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator.'
+ );
+ }
if($webServerRestart) {
$errors[] = array(
@@ -996,6 +1002,18 @@ class OC_Util {
}
/**
+ * Check if it's possible to get the inline annotations
+ *
+ * @return bool
+ */
+ public static function isAnnotationsWorking() {
+ $reflection = new \ReflectionMethod(__METHOD__);
+ $docs = $reflection->getDocComment();
+
+ return (is_string($docs) && strlen($docs) > 50);
+ }
+
+ /**
* Check if the PHP module fileinfo is loaded.
* @return bool
*/