Skip to content

Commit

Permalink
PHP 7.4 excludes the arguments from stack traces by default.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kesselb committed Apr 30, 2020
1 parent 0fc2dd8 commit cba7219
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/public/AppFramework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ public static function buildAppNamespace(string $appId, string $topNamespace='OC
* @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;
Expand Down

0 comments on commit cba7219

Please sign in to comment.