aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-06-03 14:16:24 +0200
committerGitHub <noreply@github.com>2022-06-03 14:16:24 +0200
commit8e59d49701c43a43ab0ce70d5f17bde0167187eb (patch)
tree9ee1fb33fb4fd04a337e7b0dec5a166ff1f69234 /lib
parent2dea9a1bd501c4d882dce0463350ac4f87b5bc99 (diff)
parenta6ca9d592d37c256a30ce6d952e6b990e403e850 (diff)
downloadnextcloud-server-8e59d49701c43a43ab0ce70d5f17bde0167187eb.tar.gz
nextcloud-server-8e59d49701c43a43ab0ce70d5f17bde0167187eb.zip
Merge pull request #32435 from nextcloud/revert-32278-remove-default-php
Revert "Remove call to already default php.ini values"
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 82dcd5965aa..814f30b5af3 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -143,7 +143,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, '/') . '/';
@@ -465,6 +465,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() {
@@ -630,6 +638,7 @@ class OC {
@set_time_limit(max(intval(@ini_get('max_execution_time')), intval(@ini_get('max_input_time'))));
}
+ self::setRequiredIniValues();
self::handleAuthHeaders();
$systemConfig = \OC::$server->get(\OC\SystemConfig::class);
self::registerAutoloaderCache($systemConfig);