From cba7219b2541c35de574c2a8924a5451a253a8bb Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Thu, 30 Apr 2020 15:27:52 +0200 Subject: PHP 7.4 excludes the arguments from stack traces by default. That leads to a false positive is not setup via query() but directly warning for every app because the check does not work anymore. Signed-off-by: Daniel Kesselberg --- lib/public/AppFramework/App.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/public/AppFramework/App.php b/lib/public/AppFramework/App.php index fa97dab2a3f..016ef5a0318 100644 --- a/lib/public/AppFramework/App.php +++ b/lib/public/AppFramework/App.php @@ -77,7 +77,10 @@ class App { * @since 6.0.0 */ public function __construct(string $appName, array $urlParams = []) { - if (\OC::$server->getConfig()->getSystemValueBool('debug')) { + $runIsSetupDirectly = \OC::$server->getConfig()->getSystemValueBool('debug') + && (PHP_VERSION_ID < 70400 || (PHP_VERSION_ID >= 70400 && !ini_get('zend.exception_ignore_args'))); + + if ($runIsSetupDirectly) { $applicationClassName = get_class($this); $e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly'); $setUpViaQuery = false; -- cgit v1.2.3 From 1ef77ef948a7bf73df1c743445f85b914b04dab0 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Thu, 30 Apr 2020 17:37:20 +0200 Subject: composer run cs:fix Signed-off-by: Daniel Kesselberg --- lib/private/Files/ObjectStore/SwiftFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index 9857e1def85..0354fba638f 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -78,12 +78,12 @@ class SwiftFactory { * @throws StorageAuthException */ public function getCachedTokenId() { - if ( !isset($this->params['cachedToken']) ) { + if (!isset($this->params['cachedToken'])) { throw new StorageAuthException('Unauthenticated ObjectStore connection'); } // Is it V2 token? - if ( isset($this->params['cachedToken']['token']) ) { + if (isset($this->params['cachedToken']['token'])) { return $this->params['cachedToken']['token']['id']; } -- cgit v1.2.3