diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-05-16 15:54:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 15:54:18 +0200 |
commit | a6ca9d592d37c256a30ce6d952e6b990e403e850 (patch) | |
tree | d9bb85d73e4fd7cd09d764bd849946286159ef08 /lib/base.php | |
parent | 8100580b5d5c7f7f6dbf4bac78b04465a2e33f61 (diff) | |
download | nextcloud-server-a6ca9d592d37c256a30ce6d952e6b990e403e850.tar.gz nextcloud-server-a6ca9d592d37c256a30ce6d952e6b990e403e850.zip |
Revert "Remove call to already default php.ini values"
Diffstat (limited to 'lib/base.php')
-rw-r--r-- | lib/base.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php index 8cf5360b084..21889272dd7 100644 --- a/lib/base.php +++ b/lib/base.php @@ -141,7 +141,7 @@ class OC { public static function initPaths() { if (defined('PHPUNIT_CONFIG_DIR')) { self::$configDir = OC::$SERVERROOT . '/' . PHPUNIT_CONFIG_DIR . '/'; - } elseif (defined('PHPUNIT_RUN') && PHPUNIT_RUN && is_dir(OC::$SERVERROOT . '/tests/config/')) { + } elseif (defined('PHPUNIT_RUN') and PHPUNIT_RUN and is_dir(OC::$SERVERROOT . '/tests/config/')) { self::$configDir = OC::$SERVERROOT . '/tests/config/'; } elseif ($dir = getenv('NEXTCLOUD_CONFIG_DIR')) { self::$configDir = rtrim($dir, '/') . '/'; @@ -463,6 +463,14 @@ class OC { } /** + * Try to set some values to the required Nextcloud default + */ + public static function setRequiredIniValues() { + @ini_set('default_charset', 'UTF-8'); + @ini_set('gd.jpeg_ignore_warning', '1'); + } + + /** * Send the same site cookies */ private static function sendSameSiteCookies() { @@ -626,6 +634,7 @@ class OC { @ini_set('max_execution_time', '3600'); @ini_set('max_input_time', '3600'); + self::setRequiredIniValues(); self::handleAuthHeaders(); $systemConfig = \OC::$server->get(\OC\SystemConfig::class); self::registerAutoloaderCache($systemConfig); |