]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix for accessing non object
authorFlorin Peter <github@florin-peter.de>
Fri, 10 May 2013 22:22:58 +0000 (00:22 +0200)
committerFlorin Peter <github@florin-peter.de>
Fri, 10 May 2013 22:22:58 +0000 (00:22 +0200)
lib/public/share.php

index 17fdd338610b94bfef35b915a472db0beaf9d74b..418c0028ee5d86791ef3219b61adfcf3ad11b982 100644 (file)
@@ -1243,13 +1243,14 @@ class Share {
                                'token' => $token, 
                                'run' => $run
                        );
+
                        $run = \OC_Hook::emit(
                                'OCP\Share'
                                , 'pre_shared'
                                , $params
                        );
                        // If hook execution didn't encounter errors
-                       if ( $run !== false && !$run->run ) {
+                       if ( isset($run->run) && !$run->run ) {
                                $message = 'Sharing '.$itemSource.' failed, because pre share hooks failed';
                                \OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
                                return false;