diff options
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 18 |
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 */ |