Skip to content
Snippets Groups Projects
Unverified Commit cba7219b authored by Daniel Kesselberg's avatar Daniel Kesselberg
Browse files

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: default avatarDaniel Kesselberg <mail@danielkesselberg.de>
parent 0fc2dd85
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,10 @@ class App { ...@@ -77,7 +77,10 @@ class App {
* @since 6.0.0 * @since 6.0.0
*/ */
public function __construct(string $appName, array $urlParams = []) { 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); $applicationClassName = get_class($this);
$e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly'); $e = new \RuntimeException('App class ' . $applicationClassName . ' is not setup via query() but directly');
$setUpViaQuery = false; $setUpViaQuery = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment