diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-04-30 16:27:52 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-04-30 18:00:56 +0300 |
commit | cba7219b2541c35de574c2a8924a5451a253a8bb (patch) | |
tree | 42cabd612c2aff5752103a0c45959f99c55a1252 /lib | |
parent | 0fc2dd85b5cb8793053469c0942931fa23304872 (diff) |
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 <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/AppFramework/App.php | 5 |
1 files changed, 4 insertions, 1 deletions
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; |