]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use app ID instead of object 2228/head
authorLukas Reschke <lukas@statuscode.ch>
Mon, 21 Nov 2016 23:24:23 +0000 (00:24 +0100)
committerLukas Reschke <lukas@statuscode.ch>
Mon, 21 Nov 2016 23:24:23 +0000 (00:24 +0100)
Fixes several error messages when installing an app from the appstore, including:

```
Illegal offset type in isset or empty at /media/psf/stable9/lib/private/legacy/app.php#662
Illegal offset type at /media/psf/stable9/lib/private/legacy/app.php#663
Illegal offset type at /media/psf/stable9/lib/private/legacy/app.php#661
Object of class OC_App could not be converted to string at /media/psf/stable9/lib/private/legacy/app.php#81
trim() expects parameter 1 to be string, object given at /media/psf/stable9/lib/private/legacy/app.php#628
```

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
settings/ajax/enableapp.php

index b378b3c918d8d473e2db1fbfbe598ac7badcb461..cf1b7f29db54d9edaecd4e4d1a259cb74bd09d1a 100644 (file)
@@ -35,7 +35,7 @@ try {
        $appId = (string)$_POST['appid'];
        $appId = OC_App::cleanAppId($appId);
        $app->enable($appId, $groups);
-       OC_JSON::success(['data' => ['update_required' => \OC_App::shouldUpgrade($app)]]);
+       OC_JSON::success(['data' => ['update_required' => \OC_App::shouldUpgrade($appId)]]);
 } catch (Exception $e) {
        \OCP\Util::writeLog('core', $e->getMessage(), \OCP\Util::ERROR);
        OC_JSON::error(array("data" => array("message" => $e->getMessage()) ));