We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9475cc0 commit 89cb450Copy full SHA for 89cb450
lib/private/Config.php
@@ -231,6 +231,14 @@ private function readData() {
231
232
unset($CONFIG);
233
include $file;
234
+ if (!defined('PHPUNIT_RUN') && headers_sent()) {
235
+ // syntax issues in the config file like leading spaces causing PHP to send output
236
+ $errorMessage = sprintf('Config file has leading content, please remove everything before "<?php" in %s', basename($file));
237
+ if (!defined('OC_CONSOLE')) {
238
+ print(\OCP\Util::sanitizeHTML($errorMessage));
239
+ }
240
+ throw new \Exception($errorMessage);
241
242
if (isset($CONFIG) && is_array($CONFIG)) {
243
$this->cache = array_merge($this->cache, $CONFIG);
244
}
0 commit comments