Merge pull request #20749 from nextcloud/bug/noid/is-not-setup-via-query-false-positive

PHP 7.4 excludes the arguments from stack traces by default.
This commit is contained in:
Joas Schilling 2020-05-04 09:49:50 +02:00 committed by GitHub
commit afc5966558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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;